diff -urN kwin-5.21.4.orig/plugins/screencast/screencastmanager.cpp kwin-5.21.4/plugins/screencast/screencastmanager.cpp --- kwin-5.21.4.orig/plugins/screencast/screencastmanager.cpp 2021-04-06 15:27:01.000000000 +0300 +++ kwin-5.21.4/plugins/screencast/screencastmanager.cpp 2021-04-19 10:58:00.395022083 +0300 @@ -131,7 +131,7 @@ 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);