]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix a regression
authorapo <apo@opencascade.com>
Mon, 27 Nov 2006 12:09:40 +0000 (12:09 +0000)
committerapo <apo@opencascade.com>
Mon, 27 Nov 2006 12:09:40 +0000 (12:09 +0000)
src/VISU_I/VISU_ColoredPrs3dCache_i.cc

index 80ee8d224d708751f61e9e5742e51e7bdb15d54a..a8f0fa3e16ed269b31bb64be8fd3d117dc0e0772 100644 (file)
@@ -441,7 +441,7 @@ VISU::ColoredPrs3dCache_i
            SVTK::Find<VISU_Actor>(anActors,
                                   VISU::TIsSamePrs3d(aLastVisitedPrs3d));
          // If the holder was erased from view then do nothing
-         if(!anActor->GetVisibility())
+         if(!anActor || !anActor->GetVisibility())
            return true;
 
          if(aPrs3d != aLastVisitedPrs3d){
@@ -455,7 +455,7 @@ VISU::ColoredPrs3dCache_i
              SVTK::Find<VISU_Actor>(anActors,
                                     VISU::TIsSamePrs3d(aPrs3d));
            if(!aNewActor){
-             anActor = aPrs3d->CreateActor();
+             aNewActor = aPrs3d->CreateActor();
              aViewWindow->AddActor(aNewActor);
            }else
              aNewActor->SetVisibility(true);