Răsfoiți Sursa

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

Jonathan Bowman 12 ani în urmă
părinte
comite
46c472bcd5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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;