DataCache: add missing checks

Should check for model cache handle again, and also check anim cache handle.
This commit is contained in:
Kawe Mazidjatari 2024-01-07 01:42:26 +01:00
parent ab79606c7f
commit bdb6be6255

View File

@ -67,7 +67,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle
if ((studioData->flags & nFlags))
{
if (modelCache)
if (IS_VALID_DATACACHE_HANDLE(modelCache))
{
if (a3)
{
@ -85,7 +85,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle
studioanimcache_t* const animCache = studioData->animCache;
if (animCache)
if (IS_VALID_DATACACHE_HANDLE(animCache))
{
studiohdr_t* const pStudioHdr = animCache->GetStudioHdr();