mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user