From dd75e88cbbfb06a60bcd20f14226e8c928c4054b Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Sun, 13 Jul 2008 05:36:52 +0000 Subject: [PATCH] Identities are now dropped before extensions unload. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402415 --- core/systems/ExtensionSys.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/systems/ExtensionSys.cpp b/core/systems/ExtensionSys.cpp index af9c47d2..04b78bd2 100644 --- a/core/systems/ExtensionSys.cpp +++ b/core/systems/ExtensionSys.cpp @@ -787,10 +787,6 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt) /* Unbind our natives from Core */ pExt->DropEverything(); - - /* Tell it to unload */ - pAPI = pExt->GetAPI(); - pAPI->OnExtensionUnload(); } IdentityToken_t *pIdentity; @@ -804,6 +800,13 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt) } } + /* Tell it to unload */ + if (pExt->IsLoaded()) + { + IExtensionInterface *pAPI = pExt->GetAPI(); + pAPI->OnExtensionUnload(); + } + pExt->Unload(); delete pExt;