[gnome-control-center] display: Fix run-time warning



commit affc2ca923d1fc41d229d829f1e9a477b0912d70
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Nov 29 14:43:07 2010 +0000

    display: Fix run-time warning
    
    If the viewport changed before we're realised, don't care too much.

 panels/display/scrollarea.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/display/scrollarea.c b/panels/display/scrollarea.c
index e3ec36a..dc3078e 100644
--- a/panels/display/scrollarea.c
+++ b/panels/display/scrollarea.c
@@ -526,6 +526,9 @@ emit_viewport_changed (FooScrollArea *scroll_area,
   g_signal_emit (scroll_area, signals[VIEWPORT_CHANGED], 0,
                  new_viewport, old_viewport);
 
+  if (scroll_area->priv->input_window == NULL)
+    return;
+
   gdk_window_get_pointer (scroll_area->priv->input_window, &px, &py, NULL);
 
 #if 0



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