Check that mission exists, before marking complete status.
This commit is contained in:
parent
fe597ebb9c
commit
ef63ea73c4
|
@ -73,7 +73,11 @@ static void loadMissions(cJSON *missionsJSON)
|
|||
for (missionJSON = missionsJSON->child ; missionJSON != NULL ; missionJSON = missionJSON->next)
|
||||
{
|
||||
mission = getMission(cJSON_GetObjectItem(missionJSON, "filename")->valuestring);
|
||||
mission->completed = cJSON_GetObjectItem(missionJSON, "completed")->valueint;
|
||||
|
||||
if (mission)
|
||||
{
|
||||
mission->completed = cJSON_GetObjectItem(missionJSON, "completed")->valueint;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue