diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 9dd2c9e3c7..c9acfacd85 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -954,7 +954,9 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO 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);