| # | Line 310 | Line 310 | char *p; /* data for f */ | |
|---|---|---|
| 310 | double prob, ourthresh, hwt, test2, hit2; | |
| 311 | RAY sr; | |
| 312 | ||
| 313 | + | if (nsources <= 0) |
| 314 | + | return; |
| 315 | srccnt = (CONTRIB *)malloc(nsources*sizeof(CONTRIB)); | |
| 316 | cntord = (CNTPTR *)malloc(nsources*sizeof(CNTPTR)); | |
| 317 | if (srccnt == NULL || cntord == NULL) | |
| # | Line 408 | Line 410 | char *p; /* data for f */ | |
| 410 | addcolor(r->rcol, srccnt[cntord[sn].sno].val); | |
| 411 | } | |
| 412 | ||
| 413 | < | free(srccnt); |
| 414 | < | free(cntord); |
| 413 | > | free((char *)srccnt); |
| 414 | > | free((char *)cntord); |
| 415 | } | |
| 416 | ||
| 417 | ||
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |