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 control's window is null
  • Loading branch information
kegechen committed Aug 22, 2024
1 parent d4f4338 commit b484632
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/private/dquickcontrolpalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ void DQuickControlColorSelector::notifyColorPropertyChanged()

void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name, const DQuickControlPalette *palette)
{
if (QCoreApplication::closingDown())
if (QCoreApplication::closingDown() || (m_control && !m_control->window()))
return;
Q_ASSERT(!name.isEmpty());
QColor color;
Expand Down

0 comments on commit b484632

Please sign in to comment.