mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Implement a new module command that is called right before cosing the virtual machine to allow modules to release resources manually.
Should fix a possible crash in the IRC plugin which was caused by the Session destructor to be called recursively when cleaned automatically by the VM.
This commit is contained in:
@ -513,6 +513,10 @@ void Core::Terminate(bool shutdown)
|
||||
// Assertions during close may cause double delete/close!
|
||||
HSQUIRRELVM sq_vm = m_VM;
|
||||
m_VM = nullptr;
|
||||
|
||||
cLogDbg(m_Verbosity >= 1, "Signaling outside plug-ins the virtual machine is closing");
|
||||
// Tell modules to do their monkey business
|
||||
_Func->SendPluginCommand(SQMOD_CLOSING_CMD, "");
|
||||
// Attempt to close the VM
|
||||
sq_close(sq_vm);
|
||||
|
||||
|
Reference in New Issue
Block a user