[gnome-photos/gnome-3-24] main-toolbar: Don't leak the preview's GMenu
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-24] main-toolbar: Don't leak the preview's GMenu
- Date: Mon, 6 Nov 2017 17:19:16 +0000 (UTC)
commit 4063fff0cd9800b09b0a2a47a6c13f6bf05b2fe0
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Nov 6 17:36:02 2017 +0100
main-toolbar: Don't leak the preview's GMenu
src/photos-main-toolbar.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index a530b49..3cfac3a 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -568,7 +568,7 @@ photos_main_toolbar_populate_for_overview (PhotosMainToolbar *self)
static void
photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
{
- GMenu *preview_menu;
+ GMenu *preview_menu = NULL;
GtkWidget *back_button;
GtkWidget *edit_button;
GtkWidget *image;
@@ -627,6 +627,8 @@ photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
G_CALLBACK (photos_main_toolbar_item_active_changed),
self,
G_CONNECT_SWAPPED);
+
+ g_object_unref (preview_menu);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]