==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).
This commit is contained in:
Ken Hughes 2006-01-25 02:18:20 +00:00
parent 164a7929ce
commit dc103bceab

@ -536,7 +536,14 @@ void viewmove(int mode)
short mvalball[2], mval[2], mvalo[2]; short mvalball[2], mval[2], mvalo[2];
short use_sel = 0; 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 */ /* sometimes this routine is called from headerbuttons */
areawinset(curarea->win); areawinset(curarea->win);
initgrabz(-G.vd->ofs[0], -G.vd->ofs[1], -G.vd->ofs[2]); initgrabz(-G.vd->ofs[0], -G.vd->ofs[1], -G.vd->ofs[2]);