From 08e6bc0e6a4450882b32d293f25f1277b261914e Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 21 Sep 2012 11:54:35 +0200 Subject: [PATCH] 0000545: Undo revolve causes crash illegal storage --- src/Mod/Part/Gui/SoBrepShape.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Part/Gui/SoBrepShape.cpp b/src/Mod/Part/Gui/SoBrepShape.cpp index 39658d073..2a9c2c4cb 100644 --- a/src/Mod/Part/Gui/SoBrepShape.cpp +++ b/src/Mod/Part/Gui/SoBrepShape.cpp @@ -1178,6 +1178,12 @@ SoBrepPointSet::SoBrepPointSet() void SoBrepPointSet::GLRender(SoGLRenderAction *action) { + const SoCoordinateElement* coords = SoCoordinateElement::getInstance(action->getState()); + int num = coords->getNum() - this->startIndex.getValue(); + if (num < 0) { + // Fixes: #0000545: Undo revolve causes crash 'illegal storage' + return; + } if (this->selectionIndex.getNum() > 0) renderSelection(action); if (this->highlightIndex.getValue() >= 0)