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.8.0~96^2~350 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1ecaedbfab3f26a77bd421bcb0db4458cc9645af;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 --- diff --git a/dpsoftrast.c b/dpsoftrast.c index a646db35..b57129c1 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -1314,7 +1314,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)