Don't use release() on a unique_ptr if we don't intend to release ownership

There is nothing indicating that `OffscreenQuickScene::rootItem()`
releases ownership. Additionally, calling it multiple times currently
means we get a nullptr the second time we call it which crashes the
outputlocator effect.
This commit is contained in:
Arjen Hiemstra 2022-08-17 11:28:07 +02:00 committed by Vlad Zahorodnii
parent cf5205439c
commit 7951940761

View file

@ -692,7 +692,7 @@ QQmlContext *OffscreenQuickScene::rootContext() const
QQuickItem *OffscreenQuickScene::rootItem() const QQuickItem *OffscreenQuickScene::rootItem() const
{ {
return d->quickItem.release(); return d->quickItem.get();
} }
} // namespace KWin } // namespace KWin