From 147079ce2a38d6b064eb373cd299b6d710e67da2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 9 Nov 2018 18:01:54 +0400 Subject: [PATCH] Fix crash in unloaded userpic handling. --- Telegram/SourceFiles/data/data_peer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/data/data_peer.cpp b/Telegram/SourceFiles/data/data_peer.cpp index 1f617a6b31..fda4e5c11b 100644 --- a/Telegram/SourceFiles/data/data_peer.cpp +++ b/Telegram/SourceFiles/data/data_peer.cpp @@ -241,6 +241,9 @@ bool PeerData::useEmptyUserpic() const { StorageKey PeerData::userpicUniqueKey() const { if (useEmptyUserpic()) { + if (!_userpicEmpty) { + refreshEmptyUserpic(); + } return _userpicEmpty->uniqueKey(); } return storageKey(_userpicLocation);