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:
parent
995fc4cdda
commit
8ebf07762f
|
@ -157,6 +157,8 @@ void VideoSurface::paintEvent(QPaintEvent*)
|
||||||
if (lastFrame)
|
if (lastFrame)
|
||||||
{
|
{
|
||||||
QImage frame = lastFrame->toQImage(rect().size());
|
QImage frame = lastFrame->toQImage(rect().size());
|
||||||
|
if (frame.isNull())
|
||||||
|
lastFrame.reset();
|
||||||
painter.drawImage(boundingRect, frame, frame.rect(), Qt::NoFormatConversion);
|
painter.drawImage(boundingRect, frame, frame.rect(), Qt::NoFormatConversion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user