diff --git a/src/App/Callback/CallbackSystemHandler.hpp b/src/App/Callback/CallbackSystemHandler.hpp index cf18288b..1c2c846d 100644 --- a/src/App/Callback/CallbackSystemHandler.hpp +++ b/src/App/Callback/CallbackSystemHandler.hpp @@ -43,6 +43,8 @@ struct CallbackSystemHandler : Red::IScriptable void operator()(const Red::Handle& aEvent) { + std::unique_lock sync(callbackLock); + if (!registered || !valid) return; @@ -213,8 +215,10 @@ struct CallbackSystemHandler : Red::IScriptable CallbackLifetime lifetime{CallbackLifetime::Session}; Core::Vector> targets; bool targeted{false}; - bool valid{true}; + + Red::SharedSpinLock callbackLock; bool registered{true}; + bool valid{true}; RTTI_IMPL_TYPEINFO(App::CallbackSystemHandler); RTTI_IMPL_ALLOCATOR(); diff --git a/xmake.lua b/xmake.lua index 11b0cd19..bc155bcb 100644 --- a/xmake.lua +++ b/xmake.lua @@ -1,7 +1,7 @@ set_xmakever("2.5.9") set_project("Codeware") -set_version("1.12.2", {build = "%y%m%d%H%M"}) +set_version("1.12.3", {build = "%y%m%d%H%M"}) set_arch("x64") set_languages("cxx2a")