Fixed potential crash

Former-commit-id: 2fd792cef599915d9f73a176e462aa8c74b91987
This commit is contained in:
Lynix 2013-06-13 19:37:38 +02:00
parent bb99d044bb
commit a9c53a9c2c
1 changed files with 4 additions and 2 deletions

View File

@ -395,12 +395,14 @@ bool NzGLSLShader::SendTexture(int location, const NzTexture* texture, nzUInt8*
slot.texture->AddResourceListener(this, location);
slot.updated = false;
if (textureUnit)
*textureUnit = slot.unit;
}
else
m_textures.erase(it); // On supprime le slot
}
if (textureUnit)
else if (textureUnit)
*textureUnit = slot.unit;
}
else if (texture)