summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-12-14 01:18:18 +0100
committerPetr Mrázek <peterix@gmail.com>2018-12-14 01:18:18 +0100
commit14bb666a207ee76cf302152aa03579a47ef32215 (patch)
treee9264fba3e9922df0ecc3b2847a19def169b67f1 /application
parent075e173fbd90292706d4033fcb965a4e48b2da6f (diff)
downloadMultiMC-14bb666a207ee76cf302152aa03579a47ef32215.tar
MultiMC-14bb666a207ee76cf302152aa03579a47ef32215.tar.gz
MultiMC-14bb666a207ee76cf302152aa03579a47ef32215.tar.lz
MultiMC-14bb666a207ee76cf302152aa03579a47ef32215.tar.xz
MultiMC-14bb666a207ee76cf302152aa03579a47ef32215.zip
GH-2485 fix crash bug while creating instances
Diffstat (limited to 'application')
-rw-r--r--application/MainWindow.cpp4
-rw-r--r--application/pages/instance/LegacyUpgradePage.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 78b0a907..f144fcbd 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -1283,7 +1283,7 @@ void MainWindow::runModalTask(Task *task)
void MainWindow::instanceFromInstanceTask(InstanceTask *rawTask)
{
- std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(rawTask));
+ unique_qobject_ptr<Task> task(MMC->instances()->wrapInstanceTask(rawTask));
runModalTask(task.get());
}
@@ -1300,7 +1300,7 @@ void MainWindow::on_actionCopyInstance_triggered()
copyTask->setName(copyInstDlg.instName());
copyTask->setGroup(copyInstDlg.instGroup());
copyTask->setIcon(copyInstDlg.iconKey());
- std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(copyTask));
+ unique_qobject_ptr<Task> task(MMC->instances()->wrapInstanceTask(copyTask));
runModalTask(task.get());
}
diff --git a/application/pages/instance/LegacyUpgradePage.cpp b/application/pages/instance/LegacyUpgradePage.cpp
index 15fd10cc..af800b03 100644
--- a/application/pages/instance/LegacyUpgradePage.cpp
+++ b/application/pages/instance/LegacyUpgradePage.cpp
@@ -40,7 +40,7 @@ void LegacyUpgradePage::on_upgradeButton_clicked()
upgradeTask->setName(newName);
upgradeTask->setGroup(MMC->instances()->getInstanceGroup(m_inst->id()));
upgradeTask->setIcon(m_inst->iconKey());
- std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(upgradeTask));
+ unique_qobject_ptr<Task> task(MMC->instances()->wrapInstanceTask(upgradeTask));
runModalTask(task.get());
}