1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Add check for null shaders when releasing OpenGL objects

This commit is contained in:
AnyOldName3 2017-11-24 22:43:40 +00:00
parent 4612597877
commit 974e4d5299

View File

@ -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);
}