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
Issue: linuxdeepin/dtk#193
  • Loading branch information
kegechen committed Aug 22, 2024
1 parent 460e600 commit c6f52aa
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 c6f52aa

Please sign in to comment.