Skip to content
Permalink
Browse files

nemo-desktop-manager.c: Add null checks for GErrors - it seems as though

g_dbus calls are not guaranteed to fill the error slot (which seems like a
Gio bug to me, but there's no reason to crash here regardless because of a
null error.)

This doesn't address the larger issue of why nemo-desktop is failing here
in the first place.  If we've gotten this far, cinnamon should fill this
call successfully.

ref: https://bugzilla.redhat.com/show_bug.cgi?id=1512947

and linuxmint/cinnamon@4c17a4d
  • Loading branch information...
mtwebster committed Nov 30, 2017
1 parent a05f6c3 commit cb92eec4db471e77b4cb38072aaac7a6fff7d074
Showing with 14 additions and 5 deletions.
  1. +14 −5 src/nemo-desktop-manager.c
@@ -131,8 +131,10 @@ get_run_state (NemoDesktopManager *manager)
NULL,
&error)) {

DEBUG ("Attempting proxy call 'GetRunState' failed, resorting to fallback mode: %s", error->message);
g_error_free (error);
DEBUG ("Attempting proxy call 'GetRunState' failed, resorting to fallback mode: %s",
error ? error->message : NULL);

g_clear_error (&error);

ret = RUN_STATE_FALLBACK;
goto out;
@@ -167,8 +169,11 @@ get_n_monitors (NemoDesktopManager *manager)
&monitors,
NULL,
&error)) {
DEBUG ("Attempting proxy call 'GetMonitors' failed, retrieving n_monitors via GdkScreen: %s", error->message);
g_error_free (error);

DEBUG ("Attempting proxy call 'GetMonitors' failed, retrieving n_monitors via GdkScreen: %s",
error ? error->message : NULL);

g_clear_error (&error);

n_monitors = nemo_desktop_utils_get_num_monitors ();

@@ -227,7 +232,11 @@ get_window_rect_for_monitor (NemoDesktopManager *manager,
&out_rect_var,
NULL,
&error)) {
DEBUG ("Attempting proxy call 'GetMonitorWorkRect' failed, retrieving n_monitors via GdkScreen: %s", error->message);

DEBUG ("Attempting proxy call 'GetMonitorWorkRect' failed, retrieving n_monitors via GdkScreen: %s",
error ? error->message : NULL);

g_clear_error (&error);

nemo_desktop_utils_get_monitor_geometry (monitor, &out_rect);

0 comments on commit cb92eec

Please sign in to comment.
You can’t perform that action at this time.