From: mpv Date: Mon, 19 Jan 2015 16:40:36 +0000 (+0300) Subject: Fix for crash of double-click in one point during creation of linear segment in a... X-Git-Tag: V_1.0.0~22^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=14c1cc7b41af18f9b90dbb6466253706115da4e0;p=modules%2Fshaper.git Fix for crash of double-click in one point during creation of linear segment in a sketch --- diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index a8f9dcad9..8dd2d2e25 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -217,12 +217,14 @@ void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer) Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(aAISIO); if (!aShapePrs.IsNull()) { std::shared_ptr aShapePtr = ModelAPI_Tools::shape(aResult); - const TopoDS_Shape& aShape = aShapePrs->Shape(); - std::shared_ptr anAISShapePtr(new GeomAPI_Shape()); - anAISShapePtr->setImpl(new TopoDS_Shape(aShape)); + if (aShapePtr.get()) { + const TopoDS_Shape& aShape = aShapePrs->Shape(); + std::shared_ptr anAISShapePtr(new GeomAPI_Shape()); + anAISShapePtr->setImpl(new TopoDS_Shape(aShape)); - if (aShapePtr->isEqual(anAISShapePtr)) - return; + if (aShapePtr->isEqual(anAISShapePtr)) + return; + } } } aContext->Redisplay(aAISIO, false);