mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix crash case on invalid pointer
This commit is contained in:
parent
15e01fe309
commit
ea3caa1a0b
@ -263,9 +263,12 @@ studiohdr_t* CMDLCache::GetStudioHDR(CMDLCache* pMDLCache, MDLHandle_t handle)
|
||||
LeaveCriticalSection(reinterpret_cast<LPCRITICAL_SECTION>(&*m_MDLMutex));
|
||||
if (*(_QWORD*)(pStudioData))
|
||||
{
|
||||
void* v4 = *(void**)(*((_QWORD*)pStudioData->m_MDLCache + 1) + 24i64);
|
||||
if (v4)
|
||||
pStudioHdr = (studiohdr_t*)((char*)v4 + 0x10);
|
||||
if (reinterpret_cast<int64_t>(pStudioData->m_MDLCache) != 0xDEADFEEDDEADFEED)
|
||||
{
|
||||
void* v4 = *(void**)(*((_QWORD*)pStudioData->m_MDLCache + 1) + 24i64);
|
||||
if (v4)
|
||||
pStudioHdr = (studiohdr_t*)((char*)v4 + 0x10);
|
||||
}
|
||||
}
|
||||
return pStudioHdr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user