From 13aa316f27cb58a13326c2b56010ae3cb03eed78 Mon Sep 17 00:00:00 2001 From: vro Date: Tue, 3 Sep 2019 09:41:28 +0300 Subject: [PATCH] Issue #1140: Click on interactive cube crashes the application. --- src/AIS/AIS_InteractiveContext_1.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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); } -- 2.39.5