diff options
Diffstat (limited to 'editor/ppmdraw.c')
-rw-r--r-- | editor/ppmdraw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/ppmdraw.c b/editor/ppmdraw.c index 5a4be96b..0dd03bc9 100644 --- a/editor/ppmdraw.c +++ b/editor/ppmdraw.c @@ -332,9 +332,11 @@ static void freeScript(struct script * const scriptP) { struct commandListElt * p; + struct commandListElt * nextP; - for (p = scriptP->commandListHeadP; p; p = p->nextP) { + for (p = scriptP->commandListHeadP; p; p = nextP) { freeDrawCommand(p->commandP); + nextP = p->nextP; free(p); } |