diff --git a/assets/webconfig/js/ui_utils.js b/assets/webconfig/js/ui_utils.js index 27600ecc..6d2e74c7 100644 --- a/assets/webconfig/js/ui_utils.js +++ b/assets/webconfig/js/ui_utils.js @@ -107,8 +107,12 @@ function loadContent(event, forceRefresh) var tag; var lastSelectedInstance = getStorage('lastSelectedInstance', false); - if(lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance)) - instanceSwitch(lastSelectedInstance); + + if (lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance)) + if (typeof(window.serverInfo.instance[lastSelectedInstance].running) !== 'undefined' && window.serverInfo.instance[lastSelectedInstance].running) + instanceSwitch(lastSelectedInstance); + else + removeStorage('lastSelectedInstance', false); if(typeof event != "undefined") {