diff options
-rw-r--r-- | muse2/muse/part.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/muse2/muse/part.cpp b/muse2/muse/part.cpp index 82427d28..1d246c50 100644 --- a/muse2/muse/part.cpp +++ b/muse2/muse/part.cpp @@ -63,8 +63,13 @@ void Part::unchainClone() void Part::chainClone(Part* p) { // FIXME assertion + assert(p); - this->unchainClone(); + if (! (_prevClone==this && _nextClone==this)) // the part is still part of a clone chain! + { + printf("ERROR: THIS SHOULD NEVER HAPPEN: Part::chainClone() called, but part is already chained! I'll unchain for now, but better fix that!\n"); + this->unchainClone(); + } // Make our links to the chain this->_prevClone = p; |