summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-10 11:05:48 +0000
committerNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-11 11:21:28 +0000
commit487f0940377b4fbf9ebae8ab2a53f2f992e60deb (patch)
tree00ffcad1a7ebd3d958ec76f117f4e67457c4caed /src/widgets/toolbox.cpp
parentRemove warnings of unhandled items on Mac check menu items, thanks to Nathan ... (diff)
downloadinkscape-487f0940377b4fbf9ebae8ab2a53f2f992e60deb.tar.gz
inkscape-487f0940377b4fbf9ebae8ab2a53f2f992e60deb.zip
Reduce memory leak on editing text, etc.
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index fc5bad47a..365c0a76f 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -727,7 +727,9 @@ void update_aux_toolbox(SPDesktop * /*desktop*/, ToolBase *eventcontext, GtkWidg
gchar const *tname = ( eventcontext
? eventcontext->getPrefsPath().c_str() //g_type_name(G_OBJECT_TYPE(eventcontext))
: nullptr );
- GtkWidget *stack = (GtkWidget *)gtk_container_get_children((GtkContainer *)toolbox)->data;
+ GList *list = gtk_container_get_children((GtkContainer *)toolbox);
+ GtkWidget *stack = (GtkWidget *)list->data;
+ g_list_free(list);
gtk_stack_set_visible_child_name((GtkStack *)stack, tname);
}