summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-03-23 18:07:15 -0500
committerLostDragonist <lost.dragonist@gmail.com>2019-03-23 18:09:27 -0500
commit5f8c95e78ee4a0a3beebd28e4f10a8897908703b (patch)
tree44d1f0027f2a383457d397c2a88b6994469b7b3d /src/main.cpp
parent6a19ac3de51122f3b41b2a8d4f35e42f992c1391 (diff)
Allow the user to go back to the instance manager if using an instance and the instance's game plugin disappears or stops functioning
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
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(':')) {