From 775d22a5ca0b0524c8b55473141373bb0b59d543 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Sun, 13 Jul 2008 05:36:39 +0000 Subject: [PATCH] Identities are now dropped before extensions unload. --HG-- branch : sourcemod-1.0.x extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402414 --- core/systems/ExtensionSys.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/systems/ExtensionSys.cpp b/core/systems/ExtensionSys.cpp index e8daca49..a5f8b8db 100644 --- a/core/systems/ExtensionSys.cpp +++ b/core/systems/ExtensionSys.cpp @@ -933,9 +933,6 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt) } } - /* Tell it to unload */ - pAPI = pExt->GetAPI(); - pAPI->OnExtensionUnload(); } IdentityToken_t *pIdentity; @@ -949,6 +946,12 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt) } } + /* Tell it to unload */ + if (pExt->IsLoaded()) + { + IExtensionInterface *pAPI = pExt->GetAPI(); + pAPI->OnExtensionUnload(); + } pExt->Unload(); delete pExt;