From 7150b27aea500e5384ae90c294b0498a3dcc7997 Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 20 Apr 2011 09:11:47 +0000 Subject: [PATCH] To avoid SIGSEGV caused by pressing arrow key just after creation of the VTK view --- src/SVTK/SVTK_InteractorStyle.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 483a3fbbb..e95c0c50f 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -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]; -- 2.39.2