From: mgn Date: Tue, 2 Aug 2016 07:13:49 +0000 (+0300) Subject: 0027724: Visualization, TKV3d - Null handle check missing in AIS_InteractiveContext... X-Git-Tag: V7_1_0_beta~219 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=3475df12a6533208558e2160de1f1adb8976be64;p=occt.git 0027724: Visualization, TKV3d - Null handle check missing in AIS_InteractiveContext::SelectedShape() Null handle check has been added. --- 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());