diff --git a/resources/report/js/script.js b/resources/report/js/script.js
index ba743db1..b4f13a11 100644
--- a/resources/report/js/script.js
+++ b/resources/report/js/script.js
@@ -1032,7 +1032,7 @@ function closeSettingsDialog(evt) {
return;
}
- var dialog = evt.target.parentElement.parentElement;
+ var dialog = evt.target.parentElement;
if (evt.target.classList.contains('accept')) {
/* Update the JS variable values. */
var settings = {
diff --git a/src/gui/handler.cpp b/src/gui/handler.cpp
index b5ef9929..94a36026 100644
--- a/src/gui/handler.cpp
+++ b/src/gui/handler.cpp
@@ -263,18 +263,25 @@ namespace loot {
g_app_state.UpdateSettings(request["args"][0]);
// If the user has deleted a default game, we don't want to restore it now.
// It will be restored when LOOT is next loaded.
- vector games(request["args"][0]["games"].as< vector >());
+ try {
+ BOOST_LOG_TRIVIAL(trace) << "Updating games object.";
+ vector games(request["args"][0]["games"].as< vector >());
+ g_app_state.UpdateGames(games);
- g_app_state.UpdateGames(games);
+ // Also enable/disable debug logging as required.
+ if (request["args"][0]["enableDebugLogging"] && request["args"][0]["enableDebugLogging"].as())
+ boost::log::core::get()->set_logging_enabled(true);
+ else
+ boost::log::core::get()->set_logging_enabled(false);
- // Also enable/disable debug logging as required.
- if (request["args"][0]["enableDebugLogging"].as())
- boost::log::core::get()->set_logging_enabled(true);
- else
- boost::log::core::get()->set_logging_enabled(false);
-
- // Now send back the new list of installed games to the UI.
- callback->Success(GetInstalledGames());
+ // Now send back the new list of installed games to the UI.
+ BOOST_LOG_TRIVIAL(trace) << "Getting new list of installed games.";
+ callback->Success(GetInstalledGames());
+ }
+ catch (exception &e) {
+ BOOST_LOG_TRIVIAL(error) << e.what();
+ callback->Failure(-1, e.what());
+ }
return true;
}
else if (requestName == "applySort") {