]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To avoid SIGSEGV caused by pressing arrow key just after creation of the VTK view
authorouv <ouv@opencascade.com>
Wed, 20 Apr 2011 09:11:47 +0000 (09:11 +0000)
committerouv <ouv@opencascade.com>
Wed, 20 Apr 2011 09:11:47 +0000 (09:11 +0000)
src/SVTK/SVTK_InteractorStyle.cxx

index 483a3fbbb975546ce26708be487e4bf16498c9d3..e95c0c50fa399da26fd8a3289ca5b568aaef2f2f 100644 (file)
@@ -1307,6 +1307,9 @@ void SVTK_InteractorStyle::Place(const int theX, const int theY)
 */
 void SVTK_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY)
 {
+  if (GetCurrentRenderer() == NULL)
+    return;
+
   vtkCamera *cam = GetCurrentRenderer()->GetActiveCamera();
   double viewFocus[4], focalDepth, viewPoint[3];
   vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3];