[plasma/union/Plasma/6.7] src/output/qtquick/plugin: output/quick: Don't crash if Icon doesn't have a control assigned yet
Arjen Hiemstra <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 05955c83a0cfec7b7ffff06f1b917392a038f5c1 by Arjen Hiemstra. Committed on 17/07/2026 at 09:57. Pushed by ahiemstra into branch 'Plasma/6.7'. output/quick: Don't crash if Icon doesn't have a control assigned yet (cherry picked from commit d4fedb4d260fbcd6d804c85b105969abe0a7c2b4) Co-authored-by: Arjen Hiemstra <[email protected]> M +4 -0 src/output/qtquick/plugin/Icon.cpp https://invent.kde.org/plasma/union/-/commit/05955c83a0cfec7b7ffff06f1b917392a038f5c1 diff --git a/src/output/qtquick/plugin/Icon.cpp b/src/output/qtquick/plugin/Icon.cpp index e5c875dc..df43ae7f 100644 --- a/src/output/qtquick/plugin/Icon.cpp +++ b/src/output/qtquick/plugin/Icon.cpp @@ -254,6 +254,10 @@ void Icon::onControlIconChanged() static auto sourceProperty = iconType->property(iconType->indexOfProperty("source")); static auto colorProperty = iconType->property(iconType->indexOfProperty("color")); + if (!m_control) { + return; + } + auto icon = m_control->property("icon"); if (!icon.isValid()) { return;