mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 05:02:10 +01:00
Fix some GMenu and GMenuItem leaking
This commit is contained in:
parent
3821627366
commit
75f1802a1c
@ -639,6 +639,12 @@ g_application_finalize (GObject *object)
|
|||||||
if (g_application_get_default () == application)
|
if (g_application_get_default () == application)
|
||||||
g_application_set_default (NULL);
|
g_application_set_default (NULL);
|
||||||
|
|
||||||
|
if (application->priv->app_menu)
|
||||||
|
g_object_unref (application->priv->app_menu);
|
||||||
|
|
||||||
|
if (application->priv->menubar)
|
||||||
|
g_object_unref (application->priv->menubar);
|
||||||
|
|
||||||
G_OBJECT_CLASS (g_application_parent_class)
|
G_OBJECT_CLASS (g_application_parent_class)
|
||||||
->finalize (object);
|
->finalize (object);
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,7 @@ g_menu_markup_pop_frame (GMenuMarkupState *state)
|
|||||||
{
|
{
|
||||||
g_assert (prev->menu != NULL);
|
g_assert (prev->menu != NULL);
|
||||||
g_menu_append_item (prev->menu, state->frame.item);
|
g_menu_append_item (prev->menu, state->frame.item);
|
||||||
|
g_object_unref (state->frame.item);
|
||||||
}
|
}
|
||||||
|
|
||||||
state->frame = *prev;
|
state->frame = *prev;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user