From: ouv Date: Wed, 20 Apr 2011 09:11:47 +0000 (+0000) Subject: To avoid SIGSEGV caused by pressing arrow key just after creation of the VTK view X-Git-Tag: V6_3_0b1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7150b27aea500e5384ae90c294b0498a3dcc7997;p=modules%2Fgui.git To avoid SIGSEGV caused by pressing arrow key just after creation of the VTK view --- 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];