From c106c6ca39e2a310e50cb4751b1930be133d6df5 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 17 Oct 2005 06:46:56 +0000 Subject: [PATCH] Fix on Bug GVIEW10268 SIGSEGV appears if to keep mouse pointer over animation in 3D viewer. --- src/SVTK/SVTK_InteractorStyle.cxx | 10 +++++++--- src/SVTK/SVTK_Selector.cxx | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index b457ebb81..71e48033a 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -901,8 +901,10 @@ SVTK_InteractorStyle GetCurrentRenderer()); if(SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(myPicker->GetActor())){ - aSelectionEvent->myIsRectangle = false; - aSActor->Highlight( GetSelector(), this, aSelectionEvent, true ); + if(aSActor->hasIO()){ + aSelectionEvent->myIsRectangle = false; + aSActor->Highlight( GetSelector(), this, aSelectionEvent, true ); + } } else{ GetSelector()->ClearIObjects(); @@ -921,7 +923,9 @@ SVTK_InteractorStyle aListActors->InitTraversal(); while(vtkActor* aActor = aListActors->GetNextActor()){ if(SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor)){ - aSActor->Highlight( GetSelector(), this, aSelectionEvent, true ); + if(aSActor->hasIO()){ + aSActor->Highlight( GetSelector(), this, aSelectionEvent, true ); + } } } } diff --git a/src/SVTK/SVTK_Selector.cxx b/src/SVTK/SVTK_Selector.cxx index 90fa0b06f..59b52a696 100644 --- a/src/SVTK/SVTK_Selector.cxx +++ b/src/SVTK/SVTK_Selector.cxx @@ -99,7 +99,7 @@ bool SVTK_SelectorDef ::IsSelected(const Handle(SALOME_InteractiveObject)& theIO) const { - return myIObjects.find(theIO) != myIObjects.end(); + return !theIO.IsNull() && (myIObjects.find(theIO) != myIObjects.end()); } bool -- 2.39.2