]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
VISU::VISU_Gen::ShowTestObject() crashed if default view type was different from VTK
authorsmh <smh@opencascade.com>
Thu, 6 May 2004 14:30:15 +0000 (14:30 +0000)
committersmh <smh@opencascade.com>
Thu, 6 May 2004 14:30:15 +0000 (14:30 +0000)
src/VISU_I/VISU_ViewManager_i.cc

index 65d7d1af54dbc23d4306b58a6143df19ff859790..1ec6ddfbfb34859f81dcbb5d57ddb1be864443e0 100644 (file)
@@ -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();