From: apo Date: Mon, 17 Oct 2005 06:46:56 +0000 (+0000) Subject: Fix on Bug GVIEW10268 X-Git-Tag: TG-D5-38-2003_D2005-29-12~62 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c106c6ca39e2a310e50cb4751b1930be133d6df5;p=modules%2Fgui.git Fix on Bug GVIEW10268 SIGSEGV appears if to keep mouse pointer over animation in 3D viewer. --- 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