diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-10-10 11:05:48 +0000 |
|---|---|---|
| committer | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-10-11 11:21:28 +0000 |
| commit | 487f0940377b4fbf9ebae8ab2a53f2f992e60deb (patch) | |
| tree | 00ffcad1a7ebd3d958ec76f117f4e67457c4caed /src/widgets/toolbox.cpp | |
| parent | Remove warnings of unhandled items on Mac check menu items, thanks to Nathan ... (diff) | |
| download | inkscape-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.cpp | 4 |
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); } |
