summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
Diffstat (limited to 'logic')
-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;
}