From 4652efd6a99e8fc269ee6caf4efc5c8f08e8d514 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Mon, 7 Aug 2017 01:52:42 +0200 Subject: [PATCH] timeline: update queues during cleaning ...so destructors can safely do stuff like TM_AddAction (unless they make an infinite loop with that :P) --- src/timeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/timeline.c b/src/timeline.c index a71de86..09deed6 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -326,8 +326,8 @@ SYMBOL_EXPORT void TM_CleanQueue(struct Timeline* timeline) { free(pom->name); free(pom); pom = tmp; + timeline->queue = pom; } - timeline->queue = NULL; } SYMBOL_EXPORT void TM_CleanBackgroundQueue(struct Timeline* timeline) { @@ -344,8 +344,8 @@ SYMBOL_EXPORT void TM_CleanBackgroundQueue(struct Timeline* timeline) { free(pom->name); free(pom); pom = tmp; + timeline->background = pom; } - timeline->background = NULL; } SYMBOL_INTERNAL void DrawQueue(struct Game *game, struct TM_Action* queue, int clipX, int clipY) {