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.24 by greg, Fri Mar 21 01:04:42 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,
269 >                        "%s: warning - skipping bad incidence (%.1f,%.1f)\n",
270 >                                progname, theta_in_deg, phi_in_deg);
271 >                return(NULL);
272 >        }
273                                  /* (re)allocate RBF array */
274          newnode = (RBFNODE *)realloc(rbfarr,
275                          sizeof(RBFNODE) + sizeof(RBFVAL)*(nn-1));
# Line 290 | Line 296 | make_rbfrep()
296                          newnode->vtotal);
297   #endif
298          insert_dsf(newnode);
293
299          return(newnode);
300   memerr:
301          fprintf(stderr, "%s: Out of memory in make_rbfrep()\n", progname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines