Fixed crash on exit and changing resolution with old opengl.

Regression introduced in commit 93f24f2a745caea630018126885f06b3d1fd7933.
Playing the real game is still not working.
This commit is contained in:
Deve 2015-09-27 14:18:09 +02:00
parent f351c359fd
commit 11f6084fc5

View File

@ -157,7 +157,10 @@ IrrDriver::~IrrDriver()
delete m_shadow_matrices;
m_shadow_matrices = NULL;
Shaders::destroy();
if (CVS->isGLSL())
{
Shaders::destroy();
}
delete m_wind;
delete m_spherical_harmonics;
} // ~IrrDriver
@ -822,7 +825,10 @@ void IrrDriver::applyResolutionSettings()
GlowPassCmd::getInstance()->kill();
resetTextureTable();
// initDevice will drop the current device.
Shaders::destroy();
if (CVS->isGLSL())
{
Shaders::destroy();
}
initDevice();
// Re-init GUI engine