From: nds Date: Tue, 14 May 2019 11:31:43 +0000 (+0300) Subject: 0030784: Visualization - check if selectable of owner in internal container in AIS_In... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=9e58a207356c928cc53741a35830be150e2b3d8f;p=occt-copy.git 0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using # todo - add similar check for other places where needed --- diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index fe5cebd080..98fef4ec6c 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -888,7 +888,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);