From: smh Date: Thu, 6 May 2004 14:30:15 +0000 (+0000) Subject: VISU::VISU_Gen::ShowTestObject() crashed if default view type was different from VTK X-Git-Tag: Ecole_Ete_a4~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4846215141254453d0e2bd6b88b7d8b8dfa62b5f;p=modules%2Fvisu.git VISU::VISU_Gen::ShowTestObject() crashed if default view type was different from VTK --- diff --git a/src/VISU_I/VISU_ViewManager_i.cc b/src/VISU_I/VISU_ViewManager_i.cc index 65d7d1af..1ec6ddfb 100644 --- a/src/VISU_I/VISU_ViewManager_i.cc +++ b/src/VISU_I/VISU_ViewManager_i.cc @@ -1378,7 +1378,10 @@ namespace VISU{ QAD_Study* aStudy = desktop->getActiveStudy(); if ( !aStudy ) return ; - VTKViewer_ViewFrame* vf = (VTKViewer_ViewFrame*)(desktop->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame()); + QAD_StudyFrame* sf = desktop->getActiveStudy()->getActiveStudyFrame(); + VTKViewer_ViewFrame* vf = GetViewFrame( sf ); + if ( !vf ) + return; sphere->SetVisibility( true ); vf->getRenderer()->AddActor(sphere); vf->Repaint();