Verified Commit 59f6b776 authored by Alois Wohlschlager's avatar Alois Wohlschlager 🌾
Browse files

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
parent 68f58076
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment