diff -r c2e0db52ea07 -r eae8b3bce545 src/linetypes/conditionaledge.cpp --- a/src/linetypes/conditionaledge.cpp Sun Mar 05 13:33:37 2017 +0200 +++ b/src/linetypes/conditionaledge.cpp Sun Mar 05 16:47:52 2017 +0200 @@ -54,9 +54,13 @@ { LDEdgeLine* replacement = model()->emplaceReplacement(this); - for (int i = 0; i < replacement->numVertices(); ++i) - replacement->setVertex (i, vertex (i)); + if (replacement) + { + for (int i = 0; i < replacement->numVertices(); ++i) + replacement->setVertex (i, vertex (i)); - replacement->setColor (color()); + replacement->setColor (color()); + } + return replacement; }