gnome-control-center r9339 - trunk/capplets/display



Author: federico
Date: Wed Mar 11 15:14:11 2009
New Revision: 9339
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9339&view=rev

Log:
bgo574865 (RANDR) - Don't leave a dangling pointer for the current_output when the RANDR configuration changes

Signed-off-by: Federico Mena Quintero <federico novell com>

Modified:
   trunk/capplets/display/ChangeLog
   trunk/capplets/display/xrandr-capplet.c

Modified: trunk/capplets/display/xrandr-capplet.c
==============================================================================
--- trunk/capplets/display/xrandr-capplet.c	(original)
+++ trunk/capplets/display/xrandr-capplet.c	Wed Mar 11 15:14:11 2009
@@ -130,6 +130,7 @@
 	gnome_rr_config_free (app->current_configuration);
 
     app->current_configuration = current;
+    app->current_output = NULL;
 
 #if 0
     for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
@@ -1944,14 +1945,9 @@
 select_current_output_from_dialog_position (App *app)
 {
     if (GTK_WIDGET_REALIZED (app->dialog))
-    {
-	GnomeOutputInfo *output;
-
-	output = get_output_for_window (app->current_configuration, app->dialog->window);
-
-	if (output)
-	    app->current_output = output;
-    }
+	app->current_output = get_output_for_window (app->current_configuration, app->dialog->window);
+    else
+	app->current_output = NULL;
 
     rebuild_gui (app);
 }



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