2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

some crashes fixed

This commit is contained in:
John Preston
2016-02-14 18:58:39 +03:00
parent a439fc32da
commit e492b1e93d
9 changed files with 47 additions and 33 deletions

View File

@@ -2469,7 +2469,7 @@ namespace App {
QString phoneFromSharedContact(int32 userId) {
SharedContactItems::const_iterator i = ::sharedContactItems.constFind(userId);
if (i != ::sharedContactItems.cend()) {
if (i != ::sharedContactItems.cend() && !i->isEmpty()) {
HistoryMedia *media = i->cbegin().key()->getMedia();
if (media && media->type() == MediaTypeContact) {
return static_cast<HistoryContact*>(media)->phone();