ResumeExecution: guard against open/link failure on live reload

This commit is contained in:
Sebastian Krzyszkowiak 2018-04-18 23:14:05 +02:00
parent 08d2e544b7
commit 0af3d8b1d0

View file

@ -502,8 +502,9 @@ SYMBOL_INTERNAL void ResumeExecution(struct Game* game) {
char* name = strdup(tmp->name);
CloseGamestate(game, tmp);
tmp->name = name;
OpenGamestate(game, tmp);
LinkGamestate(game, tmp);
if (OpenGamestate(game, tmp) && LinkGamestate(game, tmp)) {
tmp->api->Gamestate_Reload(game, tmp->data);
}
tmp = tmp->next;
}
game->_priv.paused = false;