Fix crash in video messages playback.

Regression was introduced in ad3e447f08.
This commit is contained in:
John Preston 2024-08-29 12:13:51 +04:00
parent ed342eea64
commit 9252be5e8c

View file

@ -670,8 +670,6 @@ void Widget::updateTimeLabel() {
void Widget::handleSongChange() {
const auto current = instance()->current(_type);
const auto document = current.audio();
_lastSongFromAnotherSession = (document->session().uniqueId()
!= _controller->session().uniqueId());
if (!current
|| !document
|| ((_lastSongId.audio() == document)
@ -679,6 +677,8 @@ void Widget::handleSongChange() {
return;
}
_lastSongId = current;
_lastSongFromAnotherSession = (document->session().uniqueId()
!= _controller->session().uniqueId());
auto textWithEntities = TextWithEntities();
if (document->isVoiceMessage() || document->isVideoMessage()) {