summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-04-30 20:48:03 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-04-30 20:48:03 -0400
commitaa93854f2ba6b0f72f1bdff9699b5724a72c89c9 (patch)
tree32dae30732ab99e57db80406de4c794db7408df3
parent636a9772bf87aa81d455c93939706984145e9033 (diff)
downloadgnome-desktop-aa93854f2ba6b0f72f1bdff9699b5724a72c89c9.tar.gz
Don't fall over if RANDR is missing
When RANDR is not present, the screen object never gets an info, and since screen_info_free asserts, we must not call it unconditionally in finalize. This fixes https://bugzilla.gnome.org/show_bug.cgi?id=649053
-rw-r--r--libgnome-desktop/gnome-rr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 4a9d98ef..eb3d7351 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -748,7 +748,8 @@ gnome_rr_screen_finalize (GObject *gobject)
gdk_window_remove_filter (screen->priv->gdk_root, screen_on_event, screen);
- screen_info_free (screen->priv->info);
+ if (screen->priv->info)
+ screen_info_free (screen->priv->info);
G_OBJECT_CLASS (gnome_rr_screen_parent_class)->finalize (gobject);
}