[gnome-control-center/wip/jsparber/background: 27/29] background: fix crash of g-c-c by opening gnome-photos
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/jsparber/background: 27/29] background: fix crash of g-c-c by opening gnome-photos
- Date: Sat, 17 Feb 2018 18:12:41 +0000 (UTC)
commit 0c672b90f6d424f9f4c2abf466fc690bb2ed1910
Author: Julian Sparber <julian sparber net>
Date: Tue Feb 6 21:48:34 2018 +0100
background: fix crash of g-c-c by opening gnome-photos
move g_object_unref (context) to the right line
https://bugzilla.gnome.org/show_bug.cgi?id=788515
panels/background/cc-background-panel.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index b1beda623..c6fe46f90 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -399,18 +399,16 @@ on_open_gnome_photos (GtkWidget *widget,
context = G_APP_LAUNCH_CONTEXT (gdk_display_get_app_launch_context (gdk_display_get_default ()));
appInfo = g_desktop_app_info_new("org.gnome.Photos.desktop");
- g_object_unref (context);
-
if (appInfo == NULL) {
g_debug ("Gnome Photos is not installed.");
}
else {
g_app_info_launch (G_APP_INFO (appInfo), NULL, context, error);
- g_prefix_error (error,
- ("Problem opening Gnome Photos: "));
+ g_prefix_error (error, "Problem opening Gnome Photos: ");
g_object_unref (appInfo);
}
+ g_object_unref (context);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]