From 0af3d8b1d0828f8e9d522359f48949cc60923894 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Wed, 18 Apr 2018 23:14:05 +0200 Subject: [PATCH] ResumeExecution: guard against open/link failure on live reload --- src/internal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/internal.c b/src/internal.c index bfb720b..bae26ce 100644 --- a/src/internal.c +++ b/src/internal.c @@ -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;