Fix crash when stopping PipeWire streaming
The stream object was deleted from a slot connected to its stopStreaming signal. This is unsafe and can lead to memory corruption and ultimately crashes when PipWwire streaming is stopped. Use deleteLater instead. BUG: 428268 435588
This commit is contained in:
parent
68f58076f4
commit
59f6b77612
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ void ScreencastManager::integrateStreams(KWaylandServer::ScreencastStreamV1Inter
|
|||
connect(waylandStream, &KWaylandServer::ScreencastStreamV1Interface::finished, stream, &PipeWireStream::stop);
|
||||
connect(stream, &PipeWireStream::stopStreaming, waylandStream, [stream, waylandStream] {
|
||||
waylandStream->sendClosed();
|
||||
delete stream;
|
||||
stream->deleteLater();
|
||||
});
|
||||
connect(stream, &PipeWireStream::streamReady, stream, [waylandStream] (uint nodeid) {
|
||||
waylandStream->sendCreated(nodeid);
|
||||
|
|
Loading…
Reference in a new issue