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

Comparing ray/src/hd/rhd_geom.c (file contents):
Revision 3.6 by gwlarson, Fri Jan 29 11:11:14 1999 UTC vs.
Revision 3.7 by gwlarson, Fri Jan 29 15:04:03 1999 UTC

# Line 55 | Line 55 | char   *file;
55                          return;
56                  }
57                                          /* else load new octree */
58 <        gmNext[i].gfile = file;
58 >        gmNext[i].gfile = savestr(file);
59          dolights = 0;
60          domats = 1;
61          gmNext[i].listid = rgl_octlist(file, gmNext[i].cent, &gmNext[i].rad);
# Line 75 | Line 75 | gmEndGeom()                    /* make next list current */
75                  FORALLGEOM(gmNext, j)
76                          if (gmNext[j].listid == gmCurrent[i].listid)
77                                  break;
78 <                if (j >= MAXGEO || gmNext[j].gfile == NULL)
78 >                if (j >= MAXGEO || gmNext[j].gfile == NULL) {
79                          glDeleteLists(gmCurrent[i].listid, 1);  /* not found */
80 +                        freestr(gmCurrent[i].gfile);
81 +                }
82          }
83          bcopy((char *)gmNext, (char *)gmCurrent, sizeof(gmNext));
84          bzero((char *)gmNext, sizeof(gmNext));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines