Fix crash in profile mode

This commit is contained in:
Benau 2016-09-03 23:03:14 +00:00 committed by GitHub
parent 29eda8a206
commit 78baaff23e

View File

@ -535,7 +535,8 @@ void IrrDriver::initDevice()
// pipeline doesn't work for them. For example some radeon drivers
// support only GLSL 1.3 and it causes STK to crash. We should force to use
// fixed pipeline in this case.
if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FORCE_LEGACY_DEVICE))
if (!ProfileWorld::isNoGraphics() &&
GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FORCE_LEGACY_DEVICE))
{
Log::warn("irr_driver", "Driver doesn't support shader-based pipeline. "
"Re-creating device to workaround the issue.");