]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix on Bug GVIEW10268
authorapo <apo@opencascade.com>
Mon, 17 Oct 2005 06:46:56 +0000 (06:46 +0000)
committerapo <apo@opencascade.com>
Mon, 17 Oct 2005 06:46:56 +0000 (06:46 +0000)
  SIGSEGV appears if to keep mouse pointer over animation in 3D viewer.

src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_Selector.cxx

index b457ebb811eb5e9127c9a868d7e468209ed46905..71e48033a65eff4f3d09d1ca0170c315c962ee9e 100644 (file)
@@ -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 );
+             }
            }
          }
        }
index 90fa0b06f71f97a9a14b297942a32a51e9c5610f..59b52a6960e20ae4c1c199eb4510428cc97512b3 100644 (file)
@@ -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