Merge pull request #443 from alliedmodders/fix-ext-dep-load
Fix crash on failing to load dependent extension.
This commit is contained in:
commit
eb8996699e
@ -297,17 +297,16 @@ bool CExtension::Load(char *error, size_t maxlength)
|
|||||||
CreateIdentity();
|
CreateIdentity();
|
||||||
if (!m_pAPI->OnExtensionLoad(this, &g_ShareSys, error, maxlength, !bridge->IsMapLoading()))
|
if (!m_pAPI->OnExtensionLoad(this, &g_ShareSys, error, maxlength, !bridge->IsMapLoading()))
|
||||||
{
|
{
|
||||||
|
g_ShareSys.RemoveInterfaces(this);
|
||||||
DestroyIdentity();
|
DestroyIdentity();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Check if we're past load time */
|
/* Check if we're past load time */
|
||||||
if (!bridge->IsMapLoading())
|
if (!bridge->IsMapLoading())
|
||||||
{
|
{
|
||||||
m_pAPI->OnExtensionsAllLoaded();
|
m_pAPI->OnExtensionsAllLoaded();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user