From: nds Date: Mon, 6 May 2019 21:15:29 +0000 (+0300) Subject: Minor check of selection owner of not displayed interactive object. X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=2b8db60c9cd1381dd7c52433cd501f82f6b88932;p=occt-copy.git Minor check of selection owner of not displayed interactive object. --- diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 466deaca1a..15b388d436 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -957,7 +957,9 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO { const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable()); const Standard_Boolean isGlobal = anObj->GlobalSelOwner() == theOwner; - 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);