GH-1875 plug holes in instance/window refcount logic

This commit is contained in:
Petr Mrázek 2017-05-01 12:55:10 +02:00
parent 21df531db1
commit b20688a18d

View File

@ -965,8 +965,8 @@ bool MultiMC::launch(InstancePtr instance, bool online, BaseProfilerFactory *pro
} }
connect(controller.get(), &LaunchController::succeeded, this, &MultiMC::controllerSucceeded); connect(controller.get(), &LaunchController::succeeded, this, &MultiMC::controllerSucceeded);
connect(controller.get(), &LaunchController::failed, this, &MultiMC::controllerFailed); connect(controller.get(), &LaunchController::failed, this, &MultiMC::controllerFailed);
controller->start();
m_runningInstances ++; m_runningInstances ++;
controller->start();
return true; return true;
} }
else if (instance->isRunning()) else if (instance->isRunning())
@ -1148,7 +1148,6 @@ void MultiMC::on_windowClose()
{ {
extras.controller->setParentWidget(m_mainWindow); extras.controller->setParentWidget(m_mainWindow);
} }
return;
} }
auto mainWindow = qobject_cast<MainWindow *>(QObject::sender()); auto mainWindow = qobject_cast<MainWindow *>(QObject::sender());
if(mainWindow) if(mainWindow)