diff --git a/vhook.cpp b/vhook.cpp index 97bf5c1..4c47220 100644 --- a/vhook.cpp +++ b/vhook.cpp @@ -381,6 +381,8 @@ cell_t GetThisPtr(void *iface, ThisPointerType type) { if(type == ThisPointer_CBaseEntity) { + if (!iface) + return -1; return gamehelpers->EntityToBCompatRef((CBaseEntity *)iface); }