From 445746c402485fcac60c02842d0cb5e0dd605e5c Mon Sep 17 00:00:00 2001 From: Naios Date: Wed, 13 Jul 2016 21:58:50 +0200 Subject: Core/Scripting: Fix acquiring of references between script swaps * Delay unloading of shared libraries to the next update tick to prevent crashes in the destructor of the last referenced script instance. * Closes #17557 --- src/server/game/Scripting/ScriptMgr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/game/Scripting/ScriptMgr.h') diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index cc1b65fa593..233e56aadb2 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -876,6 +876,9 @@ class TC_GAME_API ScriptMgr /// calls for better performance (bulk changes). void SwapScriptContext(bool initialize = false); + /// Returns the context name of the static context provided by the worldserver + static std::string const& GetNameOfStaticContext(); + /// Acquires a strong module reference to the module containing the given script name, /// which prevents the shared library which contains the script from unloading. /// The shared library is lazy unloaded as soon as all references to it are released. -- cgit v1.2.3