From a1adf2dae6310b7a924a59e45cd59e69539d0017 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 5 Apr 2017 13:04:26 +0300 Subject: [PATCH] Version 1.0.29: Fix crash on app quit. Destroy queued file loaders before destroying AuthSession, because they have references to Downloader which is owned by AuthSession. --- Telegram/SourceFiles/messenger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/messenger.cpp b/Telegram/SourceFiles/messenger.cpp index f118521a14..d6272576c4 100644 --- a/Telegram/SourceFiles/messenger.cpp +++ b/Telegram/SourceFiles/messenger.cpp @@ -696,9 +696,9 @@ void Messenger::prepareToDestroy() { _window.reset(); // Some MTP requests can be cancelled from data clearing. + _delayedDestroyedLoaders.clear(); App::clearHistories(); authSessionDestroy(); - _delayedDestroyedLoaders.clear(); _mtproto.reset(); _mtprotoForKeysDestroy.reset();