ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/bsdfrbf.c
(Generate patch)

Comparing ray/src/cv/bsdfrbf.c (file contents):
Revision 2.21 by greg, Sat Mar 15 19:47:16 2014 UTC vs.
Revision 2.22 by greg, Fri Mar 21 00:27:39 2014 UTC

# Line 262 | Line 262 | make_rbfrep()
262          comp_bsdf_min();
263                                  /* create RBF node list */
264          rbfarr = NULL; nn = 0;
265 <        if (build_rbfrep(&rbfarr, &nn, 0, GRIDRES, 0, GRIDRES) <= 0)
266 <                goto memerr;
265 >        if (build_rbfrep(&rbfarr, &nn, 0, GRIDRES, 0, GRIDRES) <= 0) {
266 >                if (nn)
267 >                        goto memerr;
268 >                fprintf(stderr, "%s: no usable data in make_rbfrep()\n",
269 >                                progname);
270 >                return(NULL);
271 >        }
272                                  /* (re)allocate RBF array */
273          newnode = (RBFNODE *)realloc(rbfarr,
274                          sizeof(RBFNODE) + sizeof(RBFVAL)*(nn-1));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines