--- ray/src/hd/rhdisp2.c 1997/12/12 12:30:20 3.14 +++ ray/src/hd/rhdisp2.c 1997/12/15 20:40:46 3.15 @@ -94,6 +94,8 @@ register struct beamcomp *cb1, *cb2; if (!cb1->wants) /* put orphans at the end, unsorted */ return(cb2->wants); + if (!cb2->wants) + return(-1); if ((c = cb1->bi - cb2->bi)) /* sort on beam index first */ return(c); return(cb1->hd - cb2->hd); /* use hd to resolve matches */