screencasting: Fix CI

It seems on the CI the dataFrame is null at times
This commit is contained in:
Aleix Pol 2024-01-19 14:10:35 +01:00 committed by Vlad Zahorodnii
parent d563bc6c86
commit 0ce01ac30f

View file

@ -114,7 +114,9 @@ std::optional<QImage> ScreencastingTest::oneFrameAndClose(Test::ScreencastingStr
std::optional<QImage> img;
connect(&pwStream, &PipeWireSourceStream::frameReceived, qGuiApp, [&img](const PipeWireFrame &frame) {
img = frame.dataFrame->toImage();
if (frame.dataFrame) {
img = frame.dataFrame->toImage();
}
});
QSignalSpy spy(&pwStream, &PipeWireSourceStream::frameReceived);