Skip to content

Commit 4c3cfd0

Browse files
committed
fixed crash caused by nullptr in lastMessage
1 parent 0e88a4e commit 4c3cfd0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Telegram/SourceFiles/dialogs/dialogs_row.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,10 @@ void Row::paintUserpic(
574574
context.now);
575575
}
576576
else {
577-
const auto lastMessageFrom = history->lastMessage()->from();
578-
lastMessageFrom->paintUserpic(p, userpicCornerView(), context.st->photoSize - skip.x() - size, context.st->photoSize - skip.y() - size, size);
577+
if (history->lastMessage()->from()) {
578+
const auto lastMessageFrom = history->lastMessage()->from();
579+
lastMessageFrom->paintUserpic(p, userpicCornerView(), context.st->photoSize - skip.x() - size, context.st->photoSize - skip.y() - size, size);
580+
}
579581
}
580582
p.translate(-context.st->padding.left(), -context.st->padding.top());
581583
p.setOpacity(1.);

Telegram/build/setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define MyAppId "4356CE01-4137-4C55-9F8B-FB4EEBB6EC0C"
99
#define CurrentYear GetDateTimeString('yyyy','','')
1010
#define MyBuildTarget "win64"
11-
#define MyAppVersionFull "5.0.1-12052024"
11+
#define MyAppVersionFull "5.0.1-13052024"
1212

1313
[Setup]
1414
; NOTE: The value of AppId uniquely identifies this application.

0 commit comments

Comments
 (0)