Kaynağa Gözat

Merge pull request #1151 from Consuuume/master

Fixed issue in PlatformWindows.cpp with __hrc causing a crash if null.
Sean Paul Taylor 12 yıl önce
ebeveyn
işleme
224b1d335b
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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;