]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix incorrect list element free in custom hud widget
authorjstebbins <jstebbins.hb@gmail.com>
Fri, 15 Apr 2011 15:38:45 +0000 (15:38 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Fri, 15 Apr 2011 15:38:45 +0000 (15:38 +0000)
was freeing the widget instead of the structure that contains the widget.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3927 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/ghbcompositor.c

index 5506975d473e3d24770c92e3ccceb03baac77851..e65cfc657f3170f7327f65ec3604a526bf6cf880 100644 (file)
@@ -418,8 +418,10 @@ ghb_compositor_remove(GtkContainer *container, GtkWidget *child)
         {
             gboolean was_visible = gtk_widget_get_visible( child );
             gtk_widget_unparent(child);
-            compositor->children = g_list_remove(compositor->children, child);
-            g_free(child);
+            compositor->children = g_list_remove_link(
+                                            compositor->children, link);
+            g_list_free(link);
+            g_free(cc);
 
             if (was_visible && gtk_widget_get_visible (GTK_WIDGET(container)))
                 gtk_widget_queue_resize(GTK_WIDGET(container));