]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
make Draw_FreePic set pic->tex to NULL to prevent reuse of invalid texture
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Dec 2009 22:41:55 +0000 (22:41 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Dec 2009 22:41:55 +0000 (22:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9586 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index 6061c8dd05be976de8293363d6afaa57d9addae4..291bdc537e9457ed8bdd3465c645d4567da23091 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -519,6 +519,7 @@ void Draw_FreePic(const char *picname)
                if (!strcmp (picname, pic->name) && pic->tex)
                {
                        R_FreeTexture(pic->tex);
+                       pic->tex = NULL;
                        pic->width = 0;
                        pic->height = 0;
                        return;