1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

VideoSurface: Release null frames

This commit is contained in:
tux3 2015-10-24 03:30:42 +02:00
parent 995fc4cdda
commit 8ebf07762f
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -157,6 +157,8 @@ void VideoSurface::paintEvent(QPaintEvent*)
if (lastFrame)
{
QImage frame = lastFrame->toQImage(rect().size());
if (frame.isNull())
lastFrame.reset();
painter.drawImage(boundingRect, frame, frame.rect(), Qt::NoFormatConversion);
}
else