fix DrawQ_Fill rendering (Pic with no string)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 Sep 2002 02:06:55 +0000 (02:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 Sep 2002 02:06:55 +0000 (02:06 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2469 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index f435ed6..1df6498 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -443,8 +443,13 @@ void R_DrawQueue(void)
                        if (strcmp(str, currentpic))
                        {
                                currentpic = str;
                        if (strcmp(str, currentpic))
                        {
                                currentpic = str;
-                               pic = Draw_CachePic(str);
-                               m.tex[0] = R_GetTexture(pic->tex);
+                               if (*str)
+                               {
+                                       pic = Draw_CachePic(str);
+                                       m.tex[0] = R_GetTexture(pic->tex);
+                               }
+                               else
+                                       m.tex[0] = 0;
                                R_Mesh_TextureState(&m);
                        }
                        if (*str)
                                R_Mesh_TextureState(&m);
                        }
                        if (*str)