diff --git a/src/backend/app/loot_state.cpp b/src/backend/app/loot_state.cpp index 9a02f9c2..2b11d47c 100644 --- a/src/backend/app/loot_state.cpp +++ b/src/backend/app/loot_state.cpp @@ -98,6 +98,10 @@ void LootState::load(YAML::Node& settings) { ++it; } + if (currentGame_ == end(games_)) { + selectGame(""); + } + // Re-initialise the current game in case the game path setting was changed. currentGame_->Init(true); // Update game path in settings object. diff --git a/src/gui/html/js/events.js b/src/gui/html/js/events.js index e8fc9b59..1b9afe07 100644 --- a/src/gui/html/js/events.js +++ b/src/gui/html/js/events.js @@ -323,6 +323,12 @@ function onCloseSettingsDialog(evt) { loot.DOM.updateEnabledGames(loot.installedGames); loot.DOM.updateSelectedGame(loot.game.folder); }) + .then(() => { + if (loot.game.folder.length === 0) { + /* Initialisation failed and game was configured in settings. */ + onContentRefresh(); + } + }) .catch(loot.handlePromiseError); } function onEditorOpen(evt) {