Don’t try to create the standard/default array texture shader if array textures are not supported.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-03-01 21:19:37 -04:00
parent 12ede289b4
commit cb9aa857d7
2 changed files with 9 additions and 0 deletions
@@ -68,6 +68,9 @@ void SpriteBatch::draw(Graphics *gfx, const Matrix4 &m)
if (textype == TEXTURE_2D_ARRAY && Shader::isDefaultActive())
{
if (!Shader::standardShaders[Shader::STANDARD_ARRAY])
throw love::Exception("Standard array texture shader has not been initialized!");
prevdefaultshader = Shader::current;
Shader::standardShaders[Shader::STANDARD_ARRAY]->attach();
}