From 2e17b480a5971a20e3029e0e7ba63a5ecd08993d Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 12 Mar 2017 11:52:28 +0300 Subject: [PATCH] Fix crash in HistoryVideo::draw. --- Telegram/SourceFiles/history/history_media_types.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_media_types.cpp b/Telegram/SourceFiles/history/history_media_types.cpp index b9a7c2da3..91340c60b 100644 --- a/Telegram/SourceFiles/history/history_media_types.cpp +++ b/Telegram/SourceFiles/history/history_media_types.cpp @@ -772,7 +772,9 @@ void HistoryVideo::draw(Painter &p, const QRect &r, TextSelection selection, Tim } return &(selected ? st::historyFileThumbDownloadSelected : st::historyFileThumbDownload); })(); - icon->paintInCenter(p, inner); + if (icon) { + icon->paintInCenter(p, inner); + } if (radial) { QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine))); _animation->radial.draw(p, rinner, st::msgFileRadialLine, selected ? st::historyFileThumbRadialFgSelected : st::historyFileThumbRadialFg);