summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2013-08-27 20:31:22 +0200
committerFlorian Jung <flo@windfisch.org>2013-08-27 20:34:18 +0200
commitea623cac61f43baf3890c2c8a71c95d7ad453e28 (patch)
tree5148e116b6497b0fddf3a9ff6b95f7d8a9ece9cc /muse2
parent3b165cb0e152d2514618c6e256bdb4f49ac7d867 (diff)
assertion fixes in undo and part m(
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/part.cpp9
-rw-r--r--muse2/muse/undo.cpp2
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_;