summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-04-01 00:04:26 +0200
committerPetr Mrázek <peterix@gmail.com>2014-04-01 00:04:26 +0200
commit72bc8609837d9ae7edaf999f445caa0a6deba7e6 (patch)
tree80944cd9d877b2ae7e5f275539ba63b39abd144b
parent29b00eab311064a6ae1512c3c35144c33e7f8ac3 (diff)
downloadMultiMC-72bc8609837d9ae7edaf999f445caa0a6deba7e6.tar
MultiMC-72bc8609837d9ae7edaf999f445caa0a6deba7e6.tar.gz
MultiMC-72bc8609837d9ae7edaf999f445caa0a6deba7e6.tar.lz
MultiMC-72bc8609837d9ae7edaf999f445caa0a6deba7e6.tar.xz
MultiMC-72bc8609837d9ae7edaf999f445caa0a6deba7e6.zip
Fix for invalid prelaunch commands
-rw-r--r--logic/MinecraftProcess.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp
index 5f4333b9..90767d9e 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;
}