Fix crash in HistoryVideo::draw.

This commit is contained in:
John Preston 2017-03-12 11:52:28 +03:00
parent 1395237810
commit 2e17b480a5
1 changed files with 3 additions and 1 deletions

View File

@ -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);