From: nds Date: Mon, 29 Jun 2015 08:57:02 +0000 (+0300) Subject: Issue #693 Crash when undo delete rotated segments X-Git-Tag: V_1.3.0~167 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=790ae03e46545eee02ab23c0762616f2a75b3a5b;p=modules%2Fshaper.git Issue #693 Crash when undo delete rotated segments --- diff --git a/src/SketchPlugin/SketchPlugin_MultiRotation.cpp b/src/SketchPlugin/SketchPlugin_MultiRotation.cpp index e29a52223..5b4f02c81 100644 --- a/src/SketchPlugin/SketchPlugin_MultiRotation.cpp +++ b/src/SketchPlugin/SketchPlugin_MultiRotation.cpp @@ -47,6 +47,12 @@ void SketchPlugin_MultiRotation::initAttributes() void SketchPlugin_MultiRotation::execute() { + if (!sketch()) { + // it is possible, that this method is called before this feature has back reference to sketch + // in this case, the execute is performed after this is done + return; + } + AttributeSelectionListPtr aRotationObjectRefs = selectionList(ROTATION_LIST_ID()); int aNbCopies = integer(NUMBER_OF_COPIES_ID())->value(); diff --git a/src/SketchPlugin/SketchPlugin_MultiTranslation.cpp b/src/SketchPlugin/SketchPlugin_MultiTranslation.cpp index d771b3101..c0e4b9946 100644 --- a/src/SketchPlugin/SketchPlugin_MultiTranslation.cpp +++ b/src/SketchPlugin/SketchPlugin_MultiTranslation.cpp @@ -42,7 +42,8 @@ void SketchPlugin_MultiTranslation::initAttributes() void SketchPlugin_MultiTranslation::execute() { if (!sketch()) { - // it is possible, that + // it is possible, that this method is called before this feature has back reference to sketch + // in this case, the execute is performed after this is done return; }