From 790ae03e46545eee02ab23c0762616f2a75b3a5b Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 29 Jun 2015 11:57:02 +0300 Subject: [PATCH] Issue #693 Crash when undo delete rotated segments --- src/SketchPlugin/SketchPlugin_MultiRotation.cpp | 6 ++++++ src/SketchPlugin/SketchPlugin_MultiTranslation.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) 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; } -- 2.39.2