From 8a0a4136e150e2add0954220b1e265656e979385 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 14 May 2019 14:31:43 +0300 Subject: [PATCH] Correction to avoid crash by calling AddOrRemoveSelected for owner of AIS_ViewCubeFlat. --- 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 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); -- 2.39.5