Fix for invalid prelaunch commands
This commit is contained in:
parent
29b00eab31
commit
72bc860983
@ -280,6 +280,7 @@ bool MinecraftProcess::preLaunch()
|
|||||||
m_prepostlaunchprocess.start(prelaunch_cmd);
|
m_prepostlaunchprocess.start(prelaunch_cmd);
|
||||||
if (!waitForPrePost())
|
if (!waitForPrePost())
|
||||||
{
|
{
|
||||||
|
emit log(tr("The command failed to start"), MessageLevel::Fatal);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Flush console window
|
// Flush console window
|
||||||
@ -352,7 +353,8 @@ bool MinecraftProcess::postLaunch()
|
|||||||
|
|
||||||
bool MinecraftProcess::waitForPrePost()
|
bool MinecraftProcess::waitForPrePost()
|
||||||
{
|
{
|
||||||
m_prepostlaunchprocess.waitForStarted();
|
if(!m_prepostlaunchprocess.waitForStarted())
|
||||||
|
return false;
|
||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
auto finisher = [this, &eventLoop](QProcess::ProcessState state)
|
auto finisher = [this, &eventLoop](QProcess::ProcessState state)
|
||||||
{
|
{
|
||||||
@ -435,6 +437,7 @@ void MinecraftProcess::arm()
|
|||||||
|
|
||||||
if (!preLaunch())
|
if (!preLaunch())
|
||||||
{
|
{
|
||||||
|
emit ended(m_instance, 1, QProcess::CrashExit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user