From 3475df12a6533208558e2160de1f1adb8976be64 Mon Sep 17 00:00:00 2001 From: mgn Date: Tue, 2 Aug 2016 10:13:49 +0300 Subject: [PATCH] 0027724: Visualization, TKV3d - Null handle check missing in AIS_InteractiveContext::SelectedShape() Null handle check has been added. --- src/AIS/AIS_InteractiveContext_1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 54fd1e1314..9b07d867d0 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -1239,7 +1239,7 @@ TopoDS_Shape AIS_InteractiveContext::SelectedShape() const const Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast (mySelection->Value()); - if (!anOwner->HasSelectable()) + if (anOwner.IsNull() || !anOwner->HasSelectable()) return TopoDS_Shape(); return anOwner->Shape().Located (anOwner->Location() * anOwner->Shape().Location());