GNOME Bugzilla – Bug 754520
mutter-launch: check if error is set before dereferencing
Last modified: 2015-09-07 12:48:42 UTC
Created attachment 310588 [details] [review] Check if error is set before dereferencing If login1_session_call_take_control_sync() returns FALSE due to some g_return_val_if_fail it does not set the error, which leads to crash in subsequent g_warning( ... , error->message)
Created attachment 310593 [details] [review] Check if error is set before dereferencing do not call g_error_free(NULL)
https://bugzilla.redhat.com/show_bug.cgi?id=1254296
Review of attachment 310593 [details] [review]: ::: src/backends/native/meta-launcher.c @@ +376,3 @@ if (!login1_session_call_take_control_sync (session_proxy, FALSE, NULL, &error)) { + g_warning ("Could not take control"); I would prefer to not split the error on two lines, i.e. if (error) { g_warning ("Could not take control: %s, error->message); g_error_free (error); } else { g_warning ("Could not take control"); }
(this got fixed by bug 753434 )