From: eihrul Date: Mon, 30 Jan 2012 21:50:20 +0000 (+0000) Subject: ensure texture is not null before adjusting bind counter X-Git-Tag: xonotic-v0.6.0~45 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bda018cfcb5e37f307b202eb23b0cdb1d6a0fa5a;p=xonotic%2Fdarkplaces.git ensure texture is not null before adjusting bind counter git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11663 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=1ecaedbfab3f26a77bd421bcb0db4458cc9645af --- diff --git a/dpsoftrast.c b/dpsoftrast.c index a79a9d36..e0868644 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -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)