From: dmv Date: Tue, 19 Aug 2008 09:17:34 +0000 (+0000) Subject: Bug IPAL20185 Fatal error in 4x, hang up in 5x on edit deformed shape if plot2d view... X-Git-Tag: V4_1_0_maintainance_20080901 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39b25c48723c1dc888feb5601ab83177894b4a48;p=modules%2Fvisu.git Bug IPAL20185 Fatal error in 4x, hang up in 5x on edit deformed shape if plot2d view is active --- diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx index 9bc7ccac..aa5554f1 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx @@ -326,9 +326,10 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP //Hide thePrs3d from Viewer SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(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; }