Skip to content

Commit

Permalink
Fix pdlua shutdown bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Sep 26, 2024
1 parent b9d2eab commit 07f3b89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/Objects/LuaObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ class LuaObject final : public ObjectBase

~LuaObject()
{
if (auto pdlua = ptr.get<t_pdlua>()) {
auto& listeners = allDrawTargets[pdlua.get()];
listeners.erase(std::remove(listeners.begin(), listeners.end(), this), listeners.end());
}
auto& listeners = allDrawTargets[ptr.getRawUnchecked<t_pdlua>()];
listeners.erase(std::remove(listeners.begin(), listeners.end(), this), listeners.end());

zoomScale.removeListener(this);
}
Expand Down

0 comments on commit 07f3b89

Please sign in to comment.