Qt/Updater: Fixed an assert on m_parent->close() (was called from a wrong thread)

This commit is contained in:
Silent 2019-06-24 21:20:34 +02:00
parent 4b03790eda
commit 94a19ca670
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 6 additions and 1 deletions

View File

@ -95,6 +95,11 @@ void Updater::OnUpdateAvailable(const NewVersionInformation& info)
AutoUpdateChecker::RestartMode::RESTART_AFTER_UPDATE);
if (!later)
m_parent->close();
{
RunOnObject(m_parent, [this] {
m_parent->close();
return 0;
});
}
}
}