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=3ca159f3cab5917e46ee05d30a120c80bc41f20f;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 (cherry picked from commit 9e58a207356c928cc53741a35830be150e2b3d8f) --- 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);