From 5f8c95e78ee4a0a3beebd28e4f10a8897908703b Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 23 Mar 2019 18:07:15 -0500 Subject: Allow the user to go back to the instance manager if using an instance and the instance's game plugin disappears or stops functioning --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index f5bba142..6d717db5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -503,6 +503,12 @@ int runApplication(MOApplication &application, SingleInstance &instance, MOBase::IPluginGame *game = determineCurrentGame( application.applicationDirPath(), settings, pluginContainer); if (game == nullptr) { + InstanceManager &instance = InstanceManager::instance(); + QString instanceName = instance.currentInstance(); + if (instanceName.compare("Portable", Qt::CaseInsensitive) != 0) { + instance.clearCurrentInstance(); + return INT_MAX; + } return 1; } if (splashPath.startsWith(':')) { -- cgit v1.3.1