Fixed potential crash
Former-commit-id: 2fd792cef599915d9f73a176e462aa8c74b91987
This commit is contained in:
parent
bb99d044bb
commit
a9c53a9c2c
|
|
@ -395,12 +395,14 @@ bool NzGLSLShader::SendTexture(int location, const NzTexture* texture, nzUInt8*
|
||||||
slot.texture->AddResourceListener(this, location);
|
slot.texture->AddResourceListener(this, location);
|
||||||
|
|
||||||
slot.updated = false;
|
slot.updated = false;
|
||||||
|
|
||||||
|
if (textureUnit)
|
||||||
|
*textureUnit = slot.unit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_textures.erase(it); // On supprime le slot
|
m_textures.erase(it); // On supprime le slot
|
||||||
}
|
}
|
||||||
|
else if (textureUnit)
|
||||||
if (textureUnit)
|
|
||||||
*textureUnit = slot.unit;
|
*textureUnit = slot.unit;
|
||||||
}
|
}
|
||||||
else if (texture)
|
else if (texture)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue