summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-02 08:40:58 -0600
committerBrian <[email protected]>2007-08-02 08:40:58 -0600
commit067370e68fde59eee0e81edbae848742abe8e3e5 (patch)
tree2ccfc0a03c111acdfbfb671ea258a344be3eccc4 /src
parent2aa439a6a431b9a82841c7e05a51ec48870d59fa (diff)
fix invalid pointer usage in bezierPatchDeleteList(), bug 11807
Diffstat (limited to 'src')
-rw-r--r--src/glu/sgi/libnurbs/interface/bezierPatch.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatch.cc b/src/glu/sgi/libnurbs/interface/bezierPatch.cc
index 836ae94e0a6..5b7bda1a001 100644
--- a/src/glu/sgi/libnurbs/interface/bezierPatch.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierPatch.cc
@@ -111,8 +111,11 @@ void bezierPatchDelete(bezierPatch *b)
void bezierPatchDeleteList(bezierPatch *b)
{
bezierPatch *temp;
- for(temp = b; temp != NULL; temp = temp->next)
- bezierPatchDelete(temp);
+ while (b != NULL) {
+ temp = b;
+ b = b->next;
+ bezierPatchDelete(temp);
+ }
}
bezierPatch* bezierPatchInsert(bezierPatch *list, bezierPatch *b)