Avoid deadlock of ClosedDocs and SpriteObserver

This commit is contained in:
lampysprites 2021-10-18 23:43:50 +07:00
parent 1f9c2e8987
commit 8c902dd8fc

View File

@ -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;