Skip to content

Commit

Permalink
fix: crashed on palette destroyed
Browse files Browse the repository at this point in the history
do not set value if palette and color invalid
  • Loading branch information
kegechen committed Aug 21, 2024
1 parent 442999f commit 594998f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/private/dquickcontrolpalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,10 @@ void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name,
} else {
color = getColorOf(name, m_state.data());
}

if (!palette && !color.isValid())
return;

m_metaObject->setValue(name, color);
}

Expand Down

0 comments on commit 594998f

Please sign in to comment.