From 314f60dea3330da9db139531006cbb1fd0c65eac Mon Sep 17 00:00:00 2001
From: black <black@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Wed, 11 May 2005 20:26:12 +0000
Subject: [PATCH] -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
---
 prvm_cmds.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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("");
 }
 
-- 
2.39.5