ecere/gui/Window: Fixed null pointer crash on fullscreen app
authorJerome St-Louis <jerome@ecere.com>
Mon, 17 Feb 2014 05:39:50 +0000 (21:39 -0800)
committerJerome St-Louis <jerome@ecere.com>
Mon, 17 Feb 2014 06:38:04 +0000 (22:38 -0800)
ecere/src/gui/Window.ec

index 9145029..3d47585 100644 (file)
@@ -5324,7 +5324,7 @@ private:
       if(interimWindow && interimWindow.master)
          interimMaster = interimWindow.master.rootWindow;
 
-      if(active && state == minimized) // && (!window.nativeDecorations || window.rootWindow != window)
+      if(active && state == minimized && window.parent) // && (!window.nativeDecorations || window.rootWindow != window)
          // SetState(normal, false, 0);
          SetState(lastState, false, 0);
 
@@ -5802,7 +5802,7 @@ private:
 
          Position(x, y, w, h, true, true, true, true, false, true);
 
-         if(!style.inactive && !style.interim && this == parent.activeClient)
+         if(!style.inactive && !style.interim && parent && this == parent.activeClient)
             parent.UpdateActiveDocument(null);
       }