From 72bc8609837d9ae7edaf999f445caa0a6deba7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 1 Apr 2014 00:04:26 +0200 Subject: [PATCH] Fix for invalid prelaunch commands --- logic/MinecraftProcess.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp index 5f4333b94..90767d9e8 100644 --- a/logic/MinecraftProcess.cpp +++ b/logic/MinecraftProcess.cpp @@ -280,6 +280,7 @@ bool MinecraftProcess::preLaunch() m_prepostlaunchprocess.start(prelaunch_cmd); if (!waitForPrePost()) { + emit log(tr("The command failed to start"), MessageLevel::Fatal); return false; } // Flush console window @@ -352,7 +353,8 @@ bool MinecraftProcess::postLaunch() bool MinecraftProcess::waitForPrePost() { - m_prepostlaunchprocess.waitForStarted(); + if(!m_prepostlaunchprocess.waitForStarted()) + return false; QEventLoop eventLoop; auto finisher = [this, &eventLoop](QProcess::ProcessState state) { @@ -435,6 +437,7 @@ void MinecraftProcess::arm() if (!preLaunch()) { + emit ended(m_instance, 1, QProcess::CrashExit); return; }