Texture::bind no longer crashes when the texture is invalid
This commit is contained in:
parent
449c7b0e3e
commit
c3fb58b33f
@ -380,7 +380,7 @@ void Texture::bind(CoordinateType coordinateType) const
|
|||||||
glCheck(glBindTexture(GL_TEXTURE_2D, m_texture));
|
glCheck(glBindTexture(GL_TEXTURE_2D, m_texture));
|
||||||
|
|
||||||
// Check if we need to define a special texture matrix
|
// Check if we need to define a special texture matrix
|
||||||
if ((coordinateType == Pixels) || m_pixelsFlipped)
|
if (m_texture && ((coordinateType == Pixels) || m_pixelsFlipped))
|
||||||
{
|
{
|
||||||
GLfloat matrix[16] = {1.f, 0.f, 0.f, 0.f,
|
GLfloat matrix[16] = {1.f, 0.f, 0.f, 0.f,
|
||||||
0.f, 1.f, 0.f, 0.f,
|
0.f, 1.f, 0.f, 0.f,
|
||||||
|
Loading…
Reference in New Issue
Block a user