Skip to content

Commit a6f1e6b

Browse files
committed
add ordnance ptr validity check
1 parent ef98013 commit a6f1e6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Internal/src/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ void hkDirectX_EndScene(LPDIRECT3DDEVICE9 device)
362362
for (const uintptr_t addr : addresses)
363363
{
364364
WeaponCannonClass* wcc = reinterpret_cast<WeaponCannonClass*>(addr);
365-
if (PTR_IS_VALID(wcc->weaponName) && PTR_IS_VALID(wcc->GeometryName))
365+
if (PTR_IS_VALID(wcc->weaponName) && PTR_IS_VALID(wcc->GeometryName) && PTR_IS_VALID(wcc->ordnancePtr))
366366
ordnance[wcc->weaponName] = (uintptr_t)wcc->ordnancePtr;
367367
}
368368

0 commit comments

Comments
 (0)