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());