diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index d34091ac7..9403ef59d 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -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