]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
ensure texture is not null before adjusting bind counter
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Jan 2012 21:50:20 +0000 (21:50 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 30 Jan 2012 22:04:03 +0000 (23:04 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11663 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=1ecaedbfab3f26a77bd421bcb0db4458cc9645af

dpsoftrast.c

index a79a9d363aee62cc8b45416277d572eca511b601..e08686440eb853ac0eaf13ecac8d1a8c5597cfea 100644 (file)
@@ -1304,7 +1304,8 @@ void DPSOFTRAST_SetTexture(int unitnum, int index)
        command->texture = texture;
 
        dpsoftrast.texbound[unitnum] = texture;
-       ATOMIC_ADD(texture->binds, dpsoftrast.numthreads);
+       if (texture)
+               ATOMIC_ADD(texture->binds, dpsoftrast.numthreads);
 }
 
 void DPSOFTRAST_SetVertexPointer(const float *vertex3f, size_t stride)