1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using

# Issue #1140: Click on interactive cube crashes the application.
This commit is contained in:
vro
2019-09-03 09:41:28 +03:00
committed by nds
parent cdfdde3191
commit fd8fbd466b

View File

@@ -538,7 +538,16 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const AIS_SelectionScheme theSe
}*/
AIS_NListOfEntityOwner aPickedOwners;
aPickedOwners.Append (myLastPicked);
if (!myLastPicked.IsNull() &&
myLastPicked->HasSelectable())
{
Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast(myLastPicked->Selectable());
if (!anIO.IsNull() &&
myObjects.IsBound(anIO))
{
aPickedOwners.Append (myLastPicked);
}
}
return Select (aPickedOwners, theSelScheme);
}