]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL19197 4x POST-001: Segmentation violation at attempt to display Deformed...
authordmv <dmv@opencascade.com>
Mon, 7 Jul 2008 12:00:01 +0000 (12:00 +0000)
committerdmv <dmv@opencascade.com>
Mon, 7 Jul 2008 12:00:01 +0000 (12:00 +0000)
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx

index ae92e5b3d44bac5cbf3186d75c266faee37569ab..9bc7ccacbf3b626754c2127a8081f0ea302be7c3 100644 (file)
@@ -286,27 +286,29 @@ void VisuGUI_DeformedShapeDlg::CreatePrs3d(VisuGUI* theModule)
                                                   aFieldName.latin1(),
                                                   aTimeStampId.toInt(),
                                                   aPublishInStudyMode);
-         
-         VisuGUI_DeformedShapeDlg* aDlg = new VisuGUI_DeformedShapeDlg (theModule);
-         aDlg->initFromPrsObject(aPrs3d, true);
-         aDlg->UseMagn->setChecked(true);
-         VisuGUI_DialogRunner r(aDlg);
-         int dlgResult = r.run( false );
-
-         if ( dlgResult == 0 )
-            DeletePrs3d(theModule,aPrs3d);
-         else {
-           aDlg->storeToPrsObject( aPrs3d );
-           SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
-           PublishInView(theModule, aPrs3d, aViewWindow);
-           if(VISU::GetResourceMgr()->booleanValue("VISU","automatic_fit_all",false))
-             aViewWindow->onFitAll();
-           int aPos = VISU::GetFreePositionOfDefaultScalarBar(theModule, aViewWindow);
-           VISU::AddScalarBarPosition(theModule, aViewWindow, aPrs3d, aPos);
+
+         if (aPrs3d) {
+           VisuGUI_DeformedShapeDlg* aDlg = new VisuGUI_DeformedShapeDlg (theModule);
+           aDlg->initFromPrsObject(aPrs3d, true);
+           aDlg->UseMagn->setChecked(true);
+           VisuGUI_DialogRunner r(aDlg);
+           int dlgResult = r.run( false );
+           
+           if ( dlgResult == 0 )
+             DeletePrs3d(theModule,aPrs3d);
+           else {
+             aDlg->storeToPrsObject( aPrs3d );
+             SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
+             PublishInView(theModule, aPrs3d, aViewWindow);
+             if(VISU::GetResourceMgr()->booleanValue("VISU","automatic_fit_all",false))
+               aViewWindow->onFitAll();
+             int aPos = VISU::GetFreePositionOfDefaultScalarBar(theModule, aViewWindow);
+             VISU::AddScalarBarPosition(theModule, aViewWindow, aPrs3d, aPos);
+           }
+           
+           VISU::UpdateObjBrowser(theModule, true, aTimeStamp);
+           delete aDlg;
          }
-         
-         VISU::UpdateObjBrowser(theModule, true, aTimeStamp);
-         delete aDlg;
        }
     }
 }