From b60e3bd911695f8dfa5f1e782ee2ff50c4483baa Mon Sep 17 00:00:00 2001 From: Denis Gorodnichev Date: Mon, 17 Feb 2014 09:19:25 +0100 Subject: Fix mate_gdk_spawn_command_line_on_screen --- libmate-desktop/mate-desktop-utils.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libmate-desktop/mate-desktop-utils.c') diff --git a/libmate-desktop/mate-desktop-utils.c b/libmate-desktop/mate-desktop-utils.c index c6ae6c4..639d2af 100644 --- a/libmate-desktop/mate-desktop-utils.c +++ b/libmate-desktop/mate-desktop-utils.c @@ -190,23 +190,21 @@ mate_gdk_spawn_command_line_on_screen (GdkScreen *screen, const gchar *command, { GAppInfo *appinfo = NULL; GdkAppLaunchContext *context = NULL; + gboolean res = FALSE; appinfo = g_app_info_create_from_commandline (command, NULL, G_APP_INFO_CREATE_NONE, error); - if (&error != NULL) { + if (appinfo) { context = gdk_app_launch_context_new (); gdk_app_launch_context_set_screen (context, screen); - g_app_info_launch (appinfo, NULL, G_APP_LAUNCH_CONTEXT (context), error); + res = g_app_info_launch (appinfo, NULL, G_APP_LAUNCH_CONTEXT (context), error); g_object_unref (context); } if (appinfo != NULL) g_object_unref (appinfo); - if (&error != NULL) - return TRUE; - else - return FALSE; + return res; } #endif -- cgit v1.2.1