diff --git a/reapi/src/hook_callback.cpp b/reapi/src/hook_callback.cpp index 5952f41..c1e5a95 100644 --- a/reapi/src/hook_callback.cpp +++ b/reapi/src/hook_callback.cpp @@ -511,7 +511,7 @@ void CSGameRules_DeathNotice(IReGameHook_CSGameRules_DeathNotice *chain, CBasePl chain->callNext(getPrivate(_pVictim), PEV(_pKiller), PEV(_pevInflictor)); }; - callVoidForward(RG_CSGameRules_DeathNotice, original, indexOfEdict(pVictim->pev), indexOfEdict(pKiller), indexOfEdict(pevInflictor)); + callVoidForward(RG_CSGameRules_DeathNotice, original, indexOfEdict(pVictim->pev), indexOfEdict(pKiller), pevInflictor ? indexOfEdict(pevInflictor) : -1); } int CSGameRules_CanHavePlayerItem(IReGameHook_CSGameRules_CanHavePlayerItem *chain, CBasePlayer *pPlayer, CBasePlayerItem *pItem)