--- ray/src/rt/source.c 1990/02/09 09:14:49 1.20 +++ ray/src/rt/source.c 1990/11/13 14:32:30 1.22 @@ -310,6 +310,8 @@ char *p; /* data for f */ double prob, ourthresh, hwt, test2, hit2; RAY sr; + if (nsources <= 0) + return; srccnt = (CONTRIB *)malloc(nsources*sizeof(CONTRIB)); cntord = (CNTPTR *)malloc(nsources*sizeof(CNTPTR)); if (srccnt == NULL || cntord == NULL) @@ -453,6 +455,8 @@ register RAY *r; m->oargs.farg[2]); /* modify value */ multcolor(r->rcol, r->pcol); + /* assign distance */ + r->rt = r->rot; } }