Code

fix crash triggered by having both knotholder and nodepath at the same time
authorbuliabyak <buliabyak@users.sourceforge.net>
Sat, 5 Jul 2008 00:52:25 +0000 (00:52 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sat, 5 Jul 2008 00:52:25 +0000 (00:52 +0000)
src/shape-editor.cpp

index 4b71184e4c5843007107af130e1d7b3888a5d569..6b488af827d7d678c3325bda2ef73481cfa2f724 100644 (file)
@@ -96,12 +96,8 @@ bool ShapeEditor::has_knotholder () {
 }
 
 bool ShapeEditor::has_local_change () {
-    if (this->nodepath)
-        return (this->nodepath->local_change != 0);
-    else if (this->knotholder)
-        return (this->knotholder->local_change != 0);
-    else
-        return false;
+    return ((this->nodepath && this->nodepath->local_change) ||
+            (this->knotholder && this->knotholder->local_change != 0));
 }
 
 void ShapeEditor::decrement_local_change () {