From dc103bceabb770f440f5ef618d12bdf4fe436058 Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Wed, 25 Jan 2006 02:18:20 +0000 Subject: [PATCH] ==bugfix== Access to G.vd without an active 3D window from sequences during Alt-A playback caused segfault; check and return if it's NULL, and print an error to stderr. (Someone should check why viewmove() is being called). --- source/blender/src/view.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/blender/src/view.c b/source/blender/src/view.c index e13a23691f9..8d39a0c9eef 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -536,7 +536,14 @@ void viewmove(int mode) short mvalball[2], mval[2], mvalo[2]; short use_sel = 0; + /* 3D window may not be defined */ + if( !G.vd ) { + fprintf( stderr, "G.vd == NULL in viewmove()\n" ); + return; + } + /* sometimes this routine is called from headerbuttons */ + areawinset(curarea->win); initgrabz(-G.vd->ofs[0], -G.vd->ofs[1], -G.vd->ofs[2]);