fixed crash bug (regression) when extensions failed to load

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402055
This commit is contained in:
David Anderson 2008-04-13 04:00:44 +00:00
parent 6d2a3a7964
commit 883e77bc60

View File

@ -1371,13 +1371,18 @@ IExtension *CExtensionManager::LoadExternal(IExtensionInterface *pInterface,
void CExtensionManager::CallOnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)
{
IExtensionInterface *pAPI;
List<CExtension *>::iterator iter;
for (iter=m_Libs.begin(); iter!=m_Libs.end(); iter++)
{
if ((*iter)->GetAPI()->GetExtensionVersion() > 3)
if ((pAPI = (*iter)->GetAPI()) == NULL)
{
(*iter)->GetAPI()->OnCoreMapStart(pEdictList, edictCount, clientMax);
continue;
}
if (pAPI->GetExtensionVersion() > 3)
{
pAPI->OnCoreMapStart(pEdictList, edictCount, clientMax);
}
}
}