Skip to content

Commit

Permalink
fixed crash caused by nullptr in lastMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
xmdnx committed May 13, 2024
1 parent 0e88a4e commit 4c3cfd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Telegram/SourceFiles/dialogs/dialogs_row.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,10 @@ void Row::paintUserpic(
context.now);
}
else {
const auto lastMessageFrom = history->lastMessage()->from();
lastMessageFrom->paintUserpic(p, userpicCornerView(), context.st->photoSize - skip.x() - size, context.st->photoSize - skip.y() - size, size);
if (history->lastMessage()->from()) {
const auto lastMessageFrom = history->lastMessage()->from();
lastMessageFrom->paintUserpic(p, userpicCornerView(), context.st->photoSize - skip.x() - size, context.st->photoSize - skip.y() - size, size);
}
}
p.translate(-context.st->padding.left(), -context.st->padding.top());
p.setOpacity(1.);
Expand Down
2 changes: 1 addition & 1 deletion Telegram/build/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define MyAppId "4356CE01-4137-4C55-9F8B-FB4EEBB6EC0C"
#define CurrentYear GetDateTimeString('yyyy','','')
#define MyBuildTarget "win64"
#define MyAppVersionFull "5.0.1-12052024"
#define MyAppVersionFull "5.0.1-13052024"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
Expand Down

0 comments on commit 4c3cfd0

Please sign in to comment.