From: nds Date: Tue, 23 Jun 2015 08:07:33 +0000 (+0300) Subject: Workaround for issues #667, 668, 670 X-Git-Tag: V_1.3.0~212 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17b61215b489751c07eef76110fb979f8dafa39f;p=modules%2Fshaper.git Workaround for issues #667, 668, 670 --- diff --git a/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp b/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp index fa091f9a7..26e5d6b51 100644 --- a/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp +++ b/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp @@ -39,11 +39,15 @@ Standard_Boolean SketcherPrs_SensitivePoint::Matches (SelectBasics_SelectingVolu gp_Pnt SketcherPrs_SensitivePoint::Point() const { + gp_Pnt aPoint(0, 0, 0); const Handle(SelectMgr_EntityOwner)& anOwner = Handle(SelectMgr_EntityOwner)::DownCast(OwnerId()); - const Handle(SketcherPrs_SymbolPrs)& aSymbPrs = - Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable()); - return aSymbPrs->pointsArray()->Vertice(myId); + if (!anOwner.IsNull()) { + const Handle(SketcherPrs_SymbolPrs)& aSymbPrs = + Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable()); + aPoint = aSymbPrs->pointsArray()->Vertice(myId); + } + return aPoint; } Handle(Select3D_SensitiveEntity) SketcherPrs_SensitivePoint::GetConnected()