Fix crash in unloaded userpic handling.

This commit is contained in:
John Preston 2018-11-09 18:01:54 +04:00
parent e992702783
commit 147079ce2a
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ bool PeerData::useEmptyUserpic() const {
StorageKey PeerData::userpicUniqueKey() const { StorageKey PeerData::userpicUniqueKey() const {
if (useEmptyUserpic()) { if (useEmptyUserpic()) {
if (!_userpicEmpty) {
refreshEmptyUserpic();
}
return _userpicEmpty->uniqueKey(); return _userpicEmpty->uniqueKey();
} }
return storageKey(_userpicLocation); return storageKey(_userpicLocation);