From: black Date: Wed, 11 May 2005 20:26:12 +0000 (+0000) Subject: -Changed VM_precache_pic to check CachePic for successful loading of the pictures. X-Git-Tag: xonotic-v0.1.0preview~4910 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=314f60dea3330da9db139531006cbb1fd0c65eac;p=xonotic%2Fdarkplaces.git -Changed VM_precache_pic to check CachePic for successful loading of the pictures. (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 --- diff --git a/prvm_cmds.c b/prvm_cmds.c index 7c06b387..4ebdc3b3 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -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(""); }