From db00dcef8615ad52423314d8c3f27e3c0faee57f Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 17 Jan 2022 17:58:11 +0100 Subject: [PATCH] qt: Fix crash when moving a Component We need to invalidate the one we are moving, otherwise we get a 2x unref. --- qt/component.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt/component.cpp b/qt/component.cpp index d0a335acb..7bb493f4f 100644 --- a/qt/component.cpp +++ b/qt/component.cpp @@ -201,6 +201,7 @@ Component& Component::operator=(const Component& other) Component::Component(Component&& other) : m_cpt(other.m_cpt) { + other.m_cpt = nullptr; } _AsComponent * AppStream::Component::asComponent() const