[gnome-control-center] display: Fix crash when the screen setup changes



commit 49f9de6182ff19dbfc13187dcca2fa5252c81a9f
Author: Michael Terry <michael terry canonical com>
Date:   Thu Mar 1 16:00:09 2012 +0000

    display: Fix crash when the screen setup changes
    
    after the Display panel has been closed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670570

 panels/display/cc-display-panel.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index c042bc6..fbc1533 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -117,6 +117,7 @@ static char *make_resolution_string (int width, int height);
 static GObject *cc_display_panel_constructor (GType                  gtype,
 					      guint                  n_properties,
 					      GObjectConstructParam *properties);
+static void on_screen_changed (GnomeRRScreen *scr, gpointer data);
 
 static void
 cc_display_panel_get_property (GObject    *object,
@@ -159,6 +160,7 @@ cc_display_panel_finalize (GObject *object)
 
   self = CC_DISPLAY_PANEL (object);
 
+  g_signal_handlers_disconnect_by_func (self->priv->screen, on_screen_changed, self);
   g_object_unref (self->priv->screen);
   g_object_unref (self->priv->builder);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]