# todo - add similar check for other places where needed
if (myAutoHilight)
{
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
- Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
+ if (!myObjects.IsBound(anObj)) // e.g. AIS_ViewCubeFlat is not displayed
+ return;
+ Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
if (theOwner->IsSelected())
{
highlightSelected (theOwner);