Fix iloop race when using AddCommandListener and SourceMod unloads (bug 4077, r=pred).

This commit is contained in:
David Anderson 2009-10-29 00:06:12 -07:00
parent 528bbe0116
commit 5111b4799c

View File

@ -156,7 +156,10 @@ class GenericCommandHooker : public IConCommandLinkListener
while (iter != vtables.end())
{
if ((*iter).refcount)
{
iter++;
continue;
}
/* Damn it. This event happens AFTER the plugin has unloaded!
* There's two options. Remove the hook now and hope SH's memory
* protection will prevent a crash. Otherwise, we can wait until