ecere/gui/drivers/Win32Interface: Fixed crashes on null objects
authorJerome St-Louis <jerome@ecere.com>
Fri, 22 May 2015 20:53:20 +0000 (16:53 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 9 Dec 2015 23:11:31 +0000 (18:11 -0500)
ecere/src/gui/drivers/Win32Interface.ec

index 69fef78..e81f1fc 100644 (file)
@@ -523,7 +523,7 @@ class Win32Interface : Interface
                      {
                         Window master = window.master;
                         Window rootWindow = master.rootWindow;
-                        if(rootWindow.displaySystem && rootWindow.displaySystem.driver == class(OpenGLDisplayDriver))
+                        if(rootWindow && rootWindow.displaySystem && rootWindow.displaySystem.driver == class(OpenGLDisplayDriver))
                            windowLong = (void *)ApplicationWindow;
                      }
 #endif
@@ -1909,7 +1909,7 @@ class Win32Interface : Interface
       // WARNING -- putting this here as it is right after CreateRootWindow
       // Take out Layered flag if we're not in 24 bit
       {
-         if(window.alphaBlend && window.display.pixelFormat != pixelFormat888)
+         if(window.alphaBlend && window.display && window.display.pixelFormat != pixelFormat888)
          {
 #ifndef ECERE_NOBLENDING
             DWORD style = GetWindowLong(window.windowHandle, GWL_EXSTYLE);