Fix crash in application closing.

This commit is contained in:
John Preston 2019-04-06 12:12:24 +04:00
parent 37af963717
commit 1ab4dbe466
2 changed files with 6 additions and 5 deletions

View file

@ -121,10 +121,11 @@ int Sandbox::start() {
[=] { newInstanceConnected(); });
crl::on_main(this, [=] { checkForQuit(); });
connect(
this,
&QCoreApplication::aboutToQuit,
[=] { closeApplication(); });
connect(this, &QCoreApplication::aboutToQuit, [=] {
customEnterFromEventLoop([&] {
closeApplication();
});
});
if (cManyInstance()) {
LOG(("Many instance allowed, starting..."));

View file

@ -128,7 +128,7 @@ void Manager::schedule() {
stopTimer();
_scheduled = true;
Ui::PostponeCall([=] {
Ui::PostponeCall(static_cast<QObject*>(this), [=] {
_scheduled = false;
if (_forceImmediateUpdate) {
_forceImmediateUpdate = false;