Added handling of failure to reclaim file

This commit is contained in:
Robert Osfield
2016-06-28 09:32:38 +01:00
parent 6937a8fcd3
commit f7bbb4821b

View File

@@ -667,6 +667,12 @@ trpgrAppFile *trpgrAppFileCache::GetFile(trpgEndian ness,int id,int col,int row)
}
}
if (oldID<0)
{
// oldID hasn't been set so we haven't found one to reclaim
return 0;
}
// Reclaim this one
OpenFile &of = files[oldID];