Fix crash by nullptr

This commit is contained in:
Kyle
2021-02-12 01:20:25 +08:00
committed by GitHub
parent d49db221d8
commit 0fa5a52caf
+1 -1
View File
@@ -128,7 +128,7 @@ void TransmitManager::Hook_SetTransmit(CCheckTransmitInfo* pInfo, bool bAlways)
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
if (IsEntityIndexInRange(owner) && !g_Hooked[owner]->CanSee(client)) if (IsEntityIndexInRange(owner) && g_Hooked[owner] != nullptr && !g_Hooked[owner]->CanSee(client))
{ {
// blocked // blocked
RETURN_META(MRES_SUPERCEDE); RETURN_META(MRES_SUPERCEDE);