fixed a bug where sdktools would crash if bintools was unloaded first

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401029
This commit is contained in:
David Anderson 2007-06-26 23:11:13 +00:00
parent 1915dd049e
commit 46411e0fb9
2 changed files with 25 additions and 0 deletions

View File

@ -97,3 +97,26 @@ bool SDKTools::QueryRunning(char *error, size_t maxlength)
return true;
}
bool SDKTools::QueryInterfaceDrop(SMInterface *pInterface)
{
if (pInterface == g_pBinTools)
{
return false;
}
return IExtensionInterface::QueryInterfaceDrop(pInterface);
}
void SDKTools::NotifyInterfaceDrop(SMInterface *pInterface)
{
List<ValveCall *>::iterator iter;
for (iter = g_RegCalls.begin();
iter != g_RegCalls.end();
iter++)
{
delete (*iter);
}
g_RegCalls.clear();
}

View File

@ -47,6 +47,8 @@ public:
virtual void SDK_OnAllLoaded();
//virtual void SDK_OnPauseChange(bool paused);
virtual bool QueryRunning(char *error, size_t maxlength);
virtual bool QueryInterfaceDrop(SMInterface *pInterface);
virtual void NotifyInterfaceDrop(SMInterface *pInterface);
public:
#if defined SMEXT_CONF_METAMOD
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);