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:
		
							parent
							
								
									1915dd049e
								
							
						
					
					
						commit
						46411e0fb9
					
				@ -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();
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user