Add check for null shaders when releasing OpenGL objects

pull/541/head
AnyOldName3 7 years ago
parent 4612597877
commit 974e4d5299

@ -347,7 +347,10 @@ namespace Shader
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mMutex);
for (auto shader : mShaders)
shader.second->releaseGLObjects(state);
{
if (shader.second != nullptr)
shader.second->releaseGLObjects(state);
}
for (auto program : mPrograms)
program.second->releaseGLObjects(state);
}

Loading…
Cancel
Save