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

Comparing ray/src/common/readwfobj.c (file contents):
Revision 2.4 by greg, Sat May 2 00:12:45 2020 UTC vs.
Revision 2.5 by greg, Mon Nov 16 18:40:53 2020 UTC

# Line 276 | Line 276 | loadOBJ(Scene *sc, const char *fspec)
276                          fprintf(stderr, " %8d statements\r", nstats);
277          }
278   #if POPEN_SUPPORT
279 <        if (fspec[0] == '!')
280 <                pclose(fp);
281 <        else
279 >        if (fspec[0] == '!' && pclose(fp) != 0) {
280 >                sprintf(errmsg, "Bad return status from: %s", fspec+1);
281 >                error(USER, errmsg);
282 >                freeScene(sc);
283 >                return(NULL);
284 >        } else
285   #endif
286          if (fp != stdin)
287                  fclose(fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines