Procházet zdrojové kódy

Fixed issue in PlatformWindows. When making the new context current, condition order caused a crash if __hrc was null.

Jonathan Bowman před 12 roky
rodič
revize
46c472bcd5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      gameplay/src/PlatformWindows.cpp

+ 1 - 1
gameplay/src/PlatformWindows.cpp

@@ -740,7 +740,7 @@ bool initializeGL(WindowCreationParams* params)
     wglDeleteContext(tempContext);
     wglDeleteContext(tempContext);
 
 
     // Make the new context current
     // Make the new context current
-    if (!wglMakeCurrent(__hdc, __hrc) || !__hrc)
+    if (!__hrc || !wglMakeCurrent(__hdc, __hrc) )
     {
     {
         GP_ERROR("Failed to make the window current.");
         GP_ERROR("Failed to make the window current.");
         return false;
         return false;