diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 578b67e8..0167083a 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -619,6 +619,8 @@ AMX *MNF_GetAmxScript(int id) while (iter && id--) ++iter; + if ((*iter) == NULL) + return NULL; return (*iter).getAMX(); }