diff options
author | Scott Balneaves <[email protected]> | 2012-11-12 08:54:33 -0600 |
---|---|---|
committer | Scott Balneaves <[email protected]> | 2012-11-12 08:54:33 -0600 |
commit | b94aaf81d04f87cfcfde76b68876fbc0d27a8deb (patch) | |
tree | a508028c3e29b1fd74d50fb7226625a128cb7500 /mate-panel/libpanel-util/panel-launch.c | |
parent | cc9615065c128be5924a12df50abfda0c6b74a3a (diff) | |
download | mate-panel-b94aaf81d04f87cfcfde76b68876fbc0d27a8deb.tar.bz2 mate-panel-b94aaf81d04f87cfcfde76b68876fbc0d27a8deb.tar.xz |
Code audit: fix compile warnings, uninitialized pointer problems
Diffstat (limited to 'mate-panel/libpanel-util/panel-launch.c')
-rw-r--r-- | mate-panel/libpanel-util/panel-launch.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mate-panel/libpanel-util/panel-launch.c b/mate-panel/libpanel-util/panel-launch.c index af2b4282..5479daaa 100644 --- a/mate-panel/libpanel-util/panel-launch.c +++ b/mate-panel/libpanel-util/panel-launch.c @@ -58,13 +58,10 @@ _panel_launch_handle_error (const gchar *name, GError *local_error, GError **error) { - if (local_error == NULL) - return TRUE; - - else if (g_error_matches (local_error, - G_IO_ERROR, G_IO_ERROR_CANCELLED)) { - g_error_free (local_error); - return TRUE; + if (g_error_matches (local_error, + G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (local_error); + return TRUE; } else if (error != NULL) @@ -104,6 +101,9 @@ panel_app_info_launch_uris (GAppInfo *appinfo, g_object_unref (context); + if ((local_error == NULL) && (retval == TRUE)) + return TRUE; + return _panel_launch_handle_error (g_app_info_get_name (appinfo), screen, local_error, error); } @@ -229,6 +229,9 @@ panel_launch_desktop_file_with_fallback (const char *desktop_file, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &local_error); + if (local_error == NULL && retval == TRUE) + return TRUE; + return _panel_launch_handle_error (fallback_exec, screen, local_error, error); } |