aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-17 08:04:15 +0200
committermarha <marha@users.sourceforge.net>2012-10-17 08:04:15 +0200
commitded57b5a4131a213d57f5a20d50b819b7a8924df (patch)
tree5be4cc93cf5d77df72f8ae6e34953e026bde071f /mesalib/src/mesa/main/texstate.c
parent54db46582aba2252d544fa3956522f9ef06b49cb (diff)
downloadvcxsrv-ded57b5a4131a213d57f5a20d50b819b7a8924df.tar.gz
vcxsrv-ded57b5a4131a213d57f5a20d50b819b7a8924df.tar.bz2
vcxsrv-ded57b5a4131a213d57f5a20d50b819b7a8924df.zip
pixman mesa git update 17 oct 2012
pixman: 6e56098c0338ce74228187e4c96fed1a66cb0956 mesa: 0199ff7fe323cf527ffacfdef3258ab85799dd13
Diffstat (limited to 'mesalib/src/mesa/main/texstate.c')
-rw-r--r--mesalib/src/mesa/main/texstate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index 1fd09e985..0e5ba44ed 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -600,6 +600,13 @@ update_texture_state( struct gl_context *ctx )
texTarget = (gl_texture_index) (ffs(enabledTargets) - 1);
texObj = _mesa_get_fallback_texture(ctx, texTarget);
+
+ assert(texObj);
+ if (!texObj) {
+ /* invalid fallback texture: don't enable the texture unit */
+ continue;
+ }
+
_mesa_reference_texobj(&texUnit->_Current, texObj);
texUnit->_ReallyEnabled = 1 << texTarget;
}