From bda018cfcb5e37f307b202eb23b0cdb1d6a0fa5a Mon Sep 17 00:00:00 2001 From: eihrul Date: Mon, 30 Jan 2012 21:50:20 +0000 Subject: [PATCH] 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 --- dpsoftrast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.2