]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL20185 Fatal error in 4x, hang up in 5x on edit deformed shape if plot2d view... V4_1_0_maintainance_20080901 V4_1_0_maintainance_20080903 V4_1_0_maintainance_20080904
authordmv <dmv@opencascade.com>
Tue, 19 Aug 2008 09:17:34 +0000 (09:17 +0000)
committerdmv <dmv@opencascade.com>
Tue, 19 Aug 2008 09:17:34 +0000 (09:17 +0000)
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx

index 9bc7ccacbf3b626754c2127a8081f0ea302be7c3..aa5554f18dc28480771f982e31c6ec2713873635 100644 (file)
@@ -326,9 +326,10 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP
 
     //Hide thePrs3d from Viewer
     SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule);
-    if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
-      if (anActor->GetVisibility())
-       anActor->VisibilityOff();
+    if (aViewWindow)
+      if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
+       if (anActor->GetVisibility())
+         anActor->VisibilityOff();
 
     VisuGUI_DialogRunner r(aDlg);
     int dlgResult = r.run( false );
@@ -348,10 +349,10 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP
         QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
         QObject::tr("BUT_OK"));
     }
-
-    if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
-      if (!anActor->GetVisibility())
-       anActor->VisibilityOn();
+    if (aViewWindow)
+      if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
+       if (!anActor->GetVisibility())
+         anActor->VisibilityOn();
     
     delete aDlg;    
   }