From 17b61215b489751c07eef76110fb979f8dafa39f Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 23 Jun 2015 11:07:33 +0300 Subject: [PATCH] Workaround for issues #667, 668, 670 --- src/SketcherPrs/SketcherPrs_SensitivePoint.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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() -- 2.39.2