From 39b25c48723c1dc888feb5601ab83177894b4a48 Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 19 Aug 2008 09:17:34 +0000 Subject: [PATCH] Bug IPAL20185 Fatal error in 4x, hang up in 5x on edit deformed shape if plot2d view is active --- src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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; } -- 2.39.2