From 8c902dd8fc7298bac78150eb2c04e440cb8dca6b Mon Sep 17 00:00:00 2001 From: lampysprites Date: Mon, 18 Oct 2021 23:43:50 +0700 Subject: [PATCH] Avoid deadlock of ClosedDocs and SpriteObserver --- src/app/script/events_class.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/script/events_class.cpp b/src/app/script/events_class.cpp index f1cd4778c..d4b1d4190 100644 --- a/src/app/script/events_class.cpp +++ b/src/app/script/events_class.cpp @@ -169,14 +169,6 @@ public: doc()->add_observer(this); } - ~SpriteEvents() { - if (m_observingUndo) { - doc()->undoHistory()->remove_observer(this); - m_observingUndo = false; - } - doc()->remove_observer(this); - } - EventType eventType(const char* eventName) const { if (std::strcmp(eventName, "change") == 0) return Change;