]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
-Changed VM_precache_pic to check CachePic for successful loading of the pictures.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 May 2005 20:26:12 +0000 (20:26 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 May 2005 20:26:12 +0000 (20:26 +0000)
 (The old check hasnt worked because CachePic always returns a valid pic pointer.)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5271 d7cf8633-e32d-0410-b094-e92efae38249

prvm_cmds.c

index 7c06b387ac3be12fc055e5f4ce492a0b187c8beb..4ebdc3b34ca11417f4465831e48ce4cb99ae6fd0 100644 (file)
@@ -2576,7 +2576,8 @@ void VM_precache_pic(void)
 
        VM_CheckEmptyString (s);
 
-       if(!Draw_CachePic(s, false))
+       // AK Draw_CachePic is supposed to always return a valid pointer
+       if( Draw_CachePic(s, false)->tex == r_texture_notexture )
                PRVM_G_INT(OFS_RETURN) = PRVM_SetString("");
 }