[gnome-mines/wip/theming-support] Initialize window before referencing it



commit e72b4a0892a8d8efbb8ad1f58363b3096dec1ef9
Author: Robert Roth <robert roth off gmail com>
Date:   Wed Jan 7 20:10:28 2015 +0200

    Initialize window before referencing it

 src/gnome-mines.vala |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index b1a6a1f..5ba3ded 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -138,8 +138,11 @@ public class Mines : Gtk.Application
         {
             warning ("Error loading css styles from %s: %s", theme_css_path, e.message);
         }
-        window.get_window ().invalidate_rect (null, true);
-        window.queue_draw ();
+        if (window != null)
+        {
+            window.get_window ().invalidate_rect (null, true);
+            window.queue_draw ();
+        }
         Gtk.StyleContext.reset_widgets (Gdk.Screen.get_default ());
 
         if (theme_dialog != null)


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