AMXX won't crash now on invalid plugin path

This commit is contained in:
Pavol Marko 2004-05-29 12:22:33 +00:00
parent b4107e3523
commit ca0a32a546

View File

@ -43,7 +43,7 @@ CForward::CForward(const char *name, ForwardExecType et, int numParams, const Fo
AMXForward *tmp = NULL; AMXForward *tmp = NULL;
for (CPluginMngr::iterator iter = g_plugins.begin(); iter; ++iter) for (CPluginMngr::iterator iter = g_plugins.begin(); iter; ++iter)
{ {
if (amx_FindPublic((*iter).getAMX(), name, &func) == AMX_ERR_NONE) if ((*iter).isValid() && amx_FindPublic((*iter).getAMX(), name, &func) == AMX_ERR_NONE)
{ {
tmp = new AMXForward; tmp = new AMXForward;
if (!tmp) if (!tmp)