Explorar o código

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

Jonathan Bowman %!s(int64=12) %!d(string=hai) anos
pai
achega
46c472bcd5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      gameplay/src/PlatformWindows.cpp

+ 1 - 1
gameplay/src/PlatformWindows.cpp

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