Fix crash by nullptr
This commit is contained in:
+2
-2
@@ -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);
|
||||||
@@ -373,4 +373,4 @@ sp_nativeinfo_t g_Natives[] =
|
|||||||
{"TransmitManager_SetEntityOwner", Native_SetEntityOwner},
|
{"TransmitManager_SetEntityOwner", Native_SetEntityOwner},
|
||||||
{"TransmitManager_SetEntityState", Native_SetEntityState},
|
{"TransmitManager_SetEntityState", Native_SetEntityState},
|
||||||
{nullptr, nullptr},
|
{nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user