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:
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…
x
Reference in New Issue
Block a user