mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
- added a NULL check for GL resource context in init code.
This commit is contained in:
parent
e14756e810
commit
a93cb0bfab
1 changed files with 13 additions and 10 deletions
|
@ -799,17 +799,20 @@ bool Win32GLVideo::InitHardware (HWND Window, int multisample)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wglMakeCurrent(m_hDC, m_hRC);
|
if (m_hRC != NULL)
|
||||||
|
{
|
||||||
|
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
|
||||||
if (prof == WGL_CONTEXT_CORE_PROFILE_BIT_ARB && !checkCoreUsability())
|
if (prof == WGL_CONTEXT_CORE_PROFILE_BIT_ARB && !checkCoreUsability())
|
||||||
{
|
{
|
||||||
wglMakeCurrent(0, 0);
|
wglMakeCurrent(0, 0);
|
||||||
wglDeleteContext(m_hRC);
|
wglDeleteContext(m_hRC);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue