return pic;
if (numcachepics == MAX_CACHED_PICS)
- Sys_Error ("numcachepics == MAX_CACHED_PICS");
+ {
+ Con_Printf ("Draw_CachePic: numcachepics == MAX_CACHED_PICS");
+ // FIXME: support NULL in callers?
+ return cachepics; // return the first one
+ }
pic = cachepics + (numcachepics++);
strlcpy (pic->name, path, sizeof(pic->name));
// link into list
if (pic == NULL)
{
if (numcachepics == MAX_CACHED_PICS)
- Sys_Error ("numcachepics == MAX_CACHED_PICS");
+ {
+ Con_Printf ("Draw_NewPic: numcachepics == MAX_CACHED_PICS");
+ // FIXME: support NULL in callers?
+ return cachepics; // return the first one
+ }
pic = cachepics + (numcachepics++);
strcpy (pic->name, picname);
// link into list