- added a NULL check for GL resource context in init code.

This commit is contained in:
Christoph Oelckers 2014-09-21 09:19:17 +02:00
parent e14756e810
commit a93cb0bfab

View file

@ -799,6 +799,8 @@ bool Win32GLVideo::InitHardware (HWND Window, int multisample)
return false; return false;
} }
if (m_hRC != NULL)
{
wglMakeCurrent(m_hDC, m_hRC); wglMakeCurrent(m_hDC, m_hRC);
// we can only use core profile contexts if GL_ARB_buffer_storage is supported or GL version is >= 4.4 // we can only use core profile contexts if GL_ARB_buffer_storage is supported or GL version is >= 4.4
@ -812,6 +814,7 @@ bool Win32GLVideo::InitHardware (HWND Window, int multisample)
return true; return true;
} }
} }
}
return false; return false;
} }