From: vro Date: Tue, 3 Sep 2019 06:41:28 +0000 (+0300) Subject: Issue #1140: Click on interactive cube crashes the application. X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR0_DMUReviewer_2;p=occt-copy.git Issue #1140: Click on interactive cube crashes the application. --- diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 89ecf91a0b..c52cae9de8 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -470,7 +470,16 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const AIS_SelectionScheme theSe }*/ AIS_NListOfEntityOwner aPickedOwners; - aPickedOwners.Append (myLastinMain); + if (!myLastinMain.IsNull() && + myLastinMain->HasSelectable()) + { + Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast(myLastinMain->Selectable()); + if (!anIO.IsNull() && + myObjects.IsBound(anIO)) + { + aPickedOwners.Append (myLastinMain); + } + } return Select (aPickedOwners, theSelScheme); }