1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-18 19:47:15 +01:00

Fix crash from uninitialized signal.

This commit is contained in:
Sandu Liviu Catalin 2021-07-04 14:08:03 +03:00
parent a15f493ef5
commit 722c7c8515

View File

@ -490,6 +490,7 @@ bool Core::Execute()
ImportPickups(); ImportPickups();
ImportVehicles(); ImportVehicles();
cLogDbg(m_Executed && m_Verbosity >= 2, "Successfully executed specified scripts");
// Successfully executed // Successfully executed
return m_Executed; return m_Executed;
} }
@ -2360,7 +2361,7 @@ void Core::InitEvents()
#endif #endif
InitSignalPair(mOnServerOption, m_Events, "ServerOption"); InitSignalPair(mOnServerOption, m_Events, "ServerOption");
InitSignalPair(mOnScriptReload, m_Events, "ScriptReload"); InitSignalPair(mOnScriptReload, m_Events, "ScriptReload");
InitSignalPair(mOnScript, m_Events, "ScriptLoaded"); InitSignalPair(mOnScriptLoaded, m_Events, "ScriptLoaded");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void Core::DropEvents() void Core::DropEvents()
@ -2505,7 +2506,7 @@ void Core::DropEvents()
#endif #endif
ResetSignalPair(mOnServerOption); ResetSignalPair(mOnServerOption);
ResetSignalPair(mOnScriptReload); ResetSignalPair(mOnScriptReload);
ResetSignalPair(mOnScript); ResetSignalPair(mOnScriptLoaded);
m_Events.Release(); m_Events.Release();
} }