2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Fix crash in DocumentData destructor.

Keep AuthSession pointer in DocumentData for loader destruction.
This commit is contained in:
John Preston
2018-01-27 12:21:57 +03:00
parent 63c1212ef1
commit a858ab5d0b
8 changed files with 187 additions and 180 deletions

View File

@@ -268,14 +268,14 @@ AuthSession &Auth() {
AuthSession::AuthSession(UserId userId)
: _userId(userId)
, _autoLockTimer([this] { checkAutoLock(); })
, _data(std::make_unique<Data::Session>(this))
, _api(std::make_unique<ApiWrap>(this))
, _calls(std::make_unique<Calls::Instance>())
, _downloader(std::make_unique<Storage::Downloader>())
, _uploader(std::make_unique<Storage::Uploader>())
, _storage(std::make_unique<Storage::Facade>())
, _notifications(std::make_unique<Window::Notifications::System>(this))
, _changelogs(Core::Changelogs::Create(this)) {
, _changelogs(Core::Changelogs::Create(this))
, _data(std::make_unique<Data::Session>(this)) {
Expects(_userId != 0);
_saveDataTimer.setCallback([this] {