We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99e6ea8 commit 18417aeCopy full SHA for 18417ae
src/CCallback.cpp
@@ -38,9 +38,9 @@ void CCallback::ProcessCallbacks()
38
for (set<AMX *>::iterator a = m_AmxList.begin(), end = m_AmxList.end(); a != end; ++a)
39
{
40
AMX *amx = (*a);
41
- int amx_index;
+ int amx_index = -1;
42
43
- if (amx_FindPublic(amx, query->Callback.Name.c_str(), &amx_index) == AMX_ERR_NONE)
+ if (amx_FindPublic(amx, query->Callback.Name.c_str(), &amx_index) == AMX_ERR_NONE && amx_index >= 0)
44
45
cell amx_mem_addr = -1;
46
CLog::Get()->StartCallback(query->Callback.Name.c_str());
0 commit comments