Prevent race condition when enabling objectives.
This commit is contained in:
parent
c41a69f363
commit
61bf77b288
|
@ -269,8 +269,12 @@ void activateObjectives(char *objectives)
|
||||||
if (strcmp(token, o->id) == 0)
|
if (strcmp(token, o->id) == 0)
|
||||||
{
|
{
|
||||||
addHudMessage(colors.cyan, _("New Objective : %s"), o->description);
|
addHudMessage(colors.cyan, _("New Objective : %s"), o->description);
|
||||||
|
|
||||||
o->active = 1;
|
o->active = 1;
|
||||||
|
|
||||||
|
/* prevent race condition */
|
||||||
|
doObjectives();
|
||||||
|
|
||||||
if (o->isEliminateAll)
|
if (o->isEliminateAll)
|
||||||
{
|
{
|
||||||
updateObjective(o->targetName, o->targetType);
|
updateObjective(o->targetName, o->targetType);
|
||||||
|
|
Loading…
Reference in New Issue