diff options
author | Florian Jung <flo@windfisch.org> | 2013-08-27 20:31:22 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2013-08-27 20:34:18 +0200 |
commit | ea623cac61f43baf3890c2c8a71c95d7ad453e28 (patch) | |
tree | 5148e116b6497b0fddf3a9ff6b95f7d8a9ece9cc /muse2/muse | |
parent | 3b165cb0e152d2514618c6e256bdb4f49ac7d867 (diff) |
assertion fixes in undo and part m(
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/part.cpp | 9 | ||||
-rw-r--r-- | muse2/muse/undo.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/muse2/muse/part.cpp b/muse2/muse/part.cpp index 9b869567..c46e7ab9 100644 --- a/muse2/muse/part.cpp +++ b/muse2/muse/part.cpp @@ -81,10 +81,11 @@ void Part::chainClone(Part* p) void Part::rechainClone() { - assert(_backupClone); - - this->chainClone(_backupClone); - _backupClone = NULL; + if(_backupClone) + { + this->chainClone(_backupClone); + _backupClone = NULL; + } } bool Part::isCloneOf(const Part* other) const diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp index 3d2804c6..b5ee3cec 100644 --- a/muse2/muse/undo.cpp +++ b/muse2/muse/undo.cpp @@ -623,7 +623,7 @@ UndoOp::UndoOp(UndoType type_, const Part* part_, unsigned old_len_or_tick, unsi UndoOp::UndoOp(UndoType type_, const Part* part_, bool selected_, bool sel_old_) { assert(type_==SelectPart); - assert(part); + assert(part_); type=type_; part = part_; |