forked from AuroraMiddleware/gtk
Don't leak the list of children (#357454, Paolo Borelli)
2006-09-25 Matthias Clasen <mclasen@redhat.com> * gtk/gtkuimanager.c (_gtk_menu_is_empty): Don't leak the list of children (#357454, Paolo Borelli)
This commit is contained in:
parent
e049989bc3
commit
c6a50a8194
@ -1,3 +1,8 @@
|
|||||||
|
2006-09-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkuimanager.c (_gtk_menu_is_empty): Don't leak
|
||||||
|
the list of children (#357454, Paolo Borelli)
|
||||||
|
|
||||||
2006-09-25 Michael Natterer <mitch@imendio.com>
|
2006-09-25 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
|
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
|
||||||
|
@ -1941,6 +1941,7 @@ gboolean
|
|||||||
_gtk_menu_is_empty (GtkWidget *menu)
|
_gtk_menu_is_empty (GtkWidget *menu)
|
||||||
{
|
{
|
||||||
GList *children, *cur;
|
GList *children, *cur;
|
||||||
|
gboolean result = TRUE;
|
||||||
|
|
||||||
g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE);
|
g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE);
|
||||||
|
|
||||||
@ -1956,13 +1957,16 @@ _gtk_menu_is_empty (GtkWidget *menu)
|
|||||||
{
|
{
|
||||||
if (!GTK_IS_TEAROFF_MENU_ITEM (cur->data) &&
|
if (!GTK_IS_TEAROFF_MENU_ITEM (cur->data) &&
|
||||||
!g_object_get_data (cur->data, "gtk-empty-menu-item"))
|
!g_object_get_data (cur->data, "gtk-empty-menu-item"))
|
||||||
return FALSE;
|
{
|
||||||
|
result = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
}
|
}
|
||||||
g_list_free (children);
|
g_list_free (children);
|
||||||
|
|
||||||
return TRUE;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
Loading…
Reference in New Issue
Block a user