ecere/gui/Window: Fixed logged errors appearing
authorJerome St-Louis <jerome@ecere.com>
Thu, 17 Jul 2014 18:30:28 +0000 (14:30 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 17 Jul 2014 18:30:28 +0000 (14:30 -0400)
- LoadGraphics was being called while Window is not yet created and no display present

ecere/src/gui/Window.ec

index 69289e2..44c93c4 100644 (file)
@@ -8109,15 +8109,14 @@ public:
                firewatchers font;
 
 
-               if(value.rootWindow && value.rootWindow.display && rootWindow)
+               if(value.rootWindow && value.rootWindow.display && rootWindow && created)
                {
                   bool reloadGraphics = (oldParent.rootWindow == oldParent && value.rootWindow) || (!value.rootWindow && rootWindow == this) ||
                         (value.rootWindow.display && value.rootWindow.display.displaySystem != rootWindow.display.displaySystem);
 
                   if(reloadGraphics)
                      UnloadGraphics(false);
-                  if(created)
-                     SetupDisplay();
+                  SetupDisplay();
                   if(reloadGraphics)
                      LoadGraphics(false, false);