From 4fbae89ffc21c9f9a768a2a12c2c502922370cb1 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sat, 5 Jul 2008 00:52:25 +0000 Subject: [PATCH] fix crash triggered by having both knotholder and nodepath at the same time --- src/shape-editor.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index 4b71184e4..6b488af82 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -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 () { -- 2.30.2