summaryrefslogtreecommitdiffstats
path: root/logic/launch/steps/LaunchMinecraft.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/launch/steps/LaunchMinecraft.cpp')
-rw-r--r--logic/launch/steps/LaunchMinecraft.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/logic/launch/steps/LaunchMinecraft.cpp b/logic/launch/steps/LaunchMinecraft.cpp
index 0cbf5f3a..05b1d948 100644
--- a/logic/launch/steps/LaunchMinecraft.cpp
+++ b/logic/launch/steps/LaunchMinecraft.cpp
@@ -88,8 +88,14 @@ void LaunchMinecraft::on_state(LoggedProcess::State state)
case LoggedProcess::Finished:
{
m_parent->setPid(-1);
+ // if the exit code wasn't 0, report this as a crash
+ auto exitCode = m_process.exitCode();
+ if(exitCode != 0)
+ {
+ emitFailed("Game crashed.");
+ return;
+ }
//FIXME: make this work again
- // auto exitCode = m_process.exitCode();
// m_postlaunchprocess.processEnvironment().insert("INST_EXITCODE", QString(exitCode));
// run post-exit
emitSucceeded();