From 07f3b89df814c9e8aeaad91b26861cebce9fe20c Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Thu, 26 Sep 2024 15:03:52 +0200 Subject: [PATCH] Fix pdlua shutdown bug --- Source/Objects/LuaObject.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Objects/LuaObject.h b/Source/Objects/LuaObject.h index c0379b287..5d2134624 100644 --- a/Source/Objects/LuaObject.h +++ b/Source/Objects/LuaObject.h @@ -84,10 +84,8 @@ class LuaObject final : public ObjectBase ~LuaObject() { - if (auto pdlua = ptr.get()) { - auto& listeners = allDrawTargets[pdlua.get()]; - listeners.erase(std::remove(listeners.begin(), listeners.end(), this), listeners.end()); - } + auto& listeners = allDrawTargets[ptr.getRawUnchecked()]; + listeners.erase(std::remove(listeners.begin(), listeners.end(), this), listeners.end()); zoomScale.removeListener(this); }