diff --git a/src/backend/plugin_sorter.cpp b/src/backend/plugin_sorter.cpp index 2aa4beac..1eb415b4 100644 --- a/src/backend/plugin_sorter.cpp +++ b/src/backend/plugin_sorter.cpp @@ -101,6 +101,10 @@ namespace loot { indexMap.clear(); oldLoadOrder.clear(); + // Clear any existing game-specific messages, as these only relate to + // state that has been changed by sorting. + game.ClearMessages(); + progressCallback(boost::locale::translate("Building plugin graph...")); BuildPluginGraph(game, language); @@ -153,9 +157,6 @@ namespace loot { plugins.push_back(graph[vertex]); } - // Clear any existing game-specific messages, as these only relate to - // state that has been changed by sorting. - game.ClearMessages(); game.SetLoadOrderSorted(true); return plugins; diff --git a/src/gui/html/js/events.js b/src/gui/html/js/events.js index 5c80310a..1896bdaf 100644 --- a/src/gui/html/js/events.js +++ b/src/gui/html/js/events.js @@ -102,8 +102,10 @@ function onSortPlugins() { loot.game.globalMessages = result.globalMessages; if (!result.plugins) { - loot.Dialog.closeProgress(); - return; + const message = result.globalMessages.find((item) => { + return item.content[0].str.startsWith('Cyclic interaction detected'); + }); + throw new Error(loot.l10n.translate('Failed to sort plugins. Details: ' + message.content[0].str)); } /* Check if sorted load order differs from current load order. */