--- ray/src/px/pcond4.c 2004/03/28 20:33:14 3.17 +++ ray/src/px/pcond4.c 2004/11/14 16:57:18 3.19 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pcond4.c,v 3.17 2004/03/28 20:33:14 schorsch Exp $"; +static const char RCSid[] = "$Id: pcond4.c,v 3.19 2004/11/14 16:57:18 greg Exp $"; #endif /* * Routines for veiling glare and loss of acuity. @@ -298,7 +298,7 @@ typedef struct { SCANBAR *rootbar; /* root scan bar (lowest resolution) */ -float *inpacuD; /* input acuity data (cycles/degree) */ +float *inpacuD = NULL; /* input acuity data (cycles/degree) */ #define tsampr(x,y) inpacuD[(y)*fvxr+(x)] @@ -364,6 +364,9 @@ acuscan( /* get acuity-sampled scanline */ double dx, dy; int ix, iy; register int x; + + if (inpacuD == NULL) + return; /* compute foveal y position */ iy = dy = (y+.5)/numscans(&inpres)*fvyr - .5; while (iy >= fvyr-1) iy--; @@ -494,7 +497,7 @@ initacuity(void) /* initialize variable acuity sampl FVECT diffx, diffy, cp; double omega, maxsr; register int x, y, i; - + compraydir(); /* compute ray directions */ inpacuD = (float *)malloc(fvxr*fvyr*sizeof(float));