screencast: Disable screencasting when a window closes

There were still some cases where we might have queried the window,
leading to a crash.

BUG: 469055
master
Aleix Pol 1 year ago committed by Aleix Pol Gonzalez
parent cf8b2195bb
commit 660ad887ee

@ -313,7 +313,10 @@ ScreenCastStream::ScreenCastStream(ScreenCastSource *source, QObject *parent)
, m_source(source)
, m_resolution(source->textureSize())
{
connect(source, &ScreenCastSource::closed, this, &ScreenCastStream::stopStreaming);
connect(source, &ScreenCastSource::closed, this, [this] {
m_streaming = false;
Q_EMIT stopStreaming();
});
pwStreamEvents.version = PW_VERSION_STREAM_EVENTS;
pwStreamEvents.add_buffer = &ScreenCastStream::onStreamAddBuffer;

Loading…
Cancel
Save