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
This commit is contained in:
parent
cf8b2195bb
commit
660ad887ee
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue