--- a/src/document.cc Thu Dec 19 01:06:34 2013 +0200 +++ b/src/document.cc Thu Dec 19 01:18:34 2013 +0200 @@ -1226,7 +1226,7 @@ void LDDocument::swapObjects (LDObject* one, LDObject* other) { int a = m_Objects.indexOf (one); int b = m_Objects.indexOf (other); - assert (a != b != -1); + assert (a != b && a != -1 && b != -1); m_Objects[b] = one; m_Objects[a] = other; addToHistory (new SwapHistory (one->getID(), other->getID()));