Merge pull request #443 from alliedmodders/fix-ext-dep-load

Fix crash on failing to load dependent extension.
This commit is contained in:
Asher Baker 2015-11-18 14:12:27 +00:00
commit eb8996699e

View File

@ -297,17 +297,16 @@ bool CExtension::Load(char *error, size_t maxlength)
CreateIdentity();
if (!m_pAPI->OnExtensionLoad(this, &g_ShareSys, error, maxlength, !bridge->IsMapLoading()))
{
g_ShareSys.RemoveInterfaces(this);
DestroyIdentity();
return false;
}
else
{
/* Check if we're past load time */
if (!bridge->IsMapLoading())
{
m_pAPI->OnExtensionsAllLoaded();
}
}
return true;
}