Commit 3a51749f authored by Alois Wohlschlager's avatar Alois Wohlschlager 🌾 Committed by Aleix Pol Gonzalez
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 0544d58b
......@@ -131,7 +131,7 @@ void ScreencastManager::integrateStreams(KWaylandServer::ScreencastStreamV1Inter
connect(waylandStream, &KWaylandServer::ScreencastStreamV1Interface::finished, stream, &PipeWireStream::stop);
connect(stream, &PipeWireStream::stopStreaming, waylandStream, [stream, waylandStream] {
delete stream;
connect(stream, &PipeWireStream::streamReady, stream, [waylandStream] (uint nodeid) {
Markdown is supported
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