From 3ca159f3cab5917e46ee05d30a120c80bc41f20f Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 14 May 2019 14:31:43 +0300 Subject: [PATCH] 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) --- src/AIS/AIS_InteractiveContext_1.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.5