From ae6e7feef093f43753b46fbf8f54ed0282fd16d2 Mon Sep 17 00:00:00 2001 From: Lewis Lakerink Date: Tue, 20 Oct 2020 07:56:37 +0000 Subject: [PATCH] Fix pipewire stream double free (cherry picked from commit 16cb4286b1111da3cc79973c6688c2a00a6f01d7) --- screencast/pipewirestream.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/screencast/pipewirestream.cpp b/screencast/pipewirestream.cpp index 26779ebaf1..1203d14ab8 100644 --- a/screencast/pipewirestream.cpp +++ b/screencast/pipewirestream.cpp @@ -252,6 +252,7 @@ bool PipeWireStream::createStream() if (pw_stream_connect(pwStream, PW_DIRECTION_OUTPUT, SPA_ID_INVALID, flags, ¶m, 1) != 0) { qCWarning(KWIN_SCREENCAST) << "Could not connect to stream"; pw_stream_destroy(pwStream); + pwStream = nullptr; return false; }