From 61bf77b288287ae43b8e5799044544ee5c420fdb Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 21 Jun 2017 08:41:27 +0100 Subject: [PATCH] Prevent race condition when enabling objectives. --- src/battle/objectives.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/battle/objectives.c b/src/battle/objectives.c index 1d786ae..50eb3be 100644 --- a/src/battle/objectives.c +++ b/src/battle/objectives.c @@ -269,8 +269,12 @@ void activateObjectives(char *objectives) if (strcmp(token, o->id) == 0) { addHudMessage(colors.cyan, _("New Objective : %s"), o->description); + o->active = 1; + /* prevent race condition */ + doObjectives(); + if (o->isEliminateAll) { updateObjective(o->targetName, o->targetType);