diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/UndoStack.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp index 26334aeb..22d48379 100644 --- a/src/server/UndoStack.hpp +++ b/src/server/UndoStack.hpp @@ -54,10 +54,12 @@ public: ~Entry() { clear(); } Entry& operator=(const Entry& rhs) { - clear(); - time = rhs.time; - for (const LV2_Atom* ev : rhs.events) { - push_event(ev); + if (&rhs != this) { + clear(); + time = rhs.time; + for (const LV2_Atom* ev : rhs.events) { + push_event(ev); + } } return *this; } |