--- ray/src/rt/source.c 1990/03/27 11:40:13 1.21 +++ 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)