diff --git a/src/duckstation-qt/colorpickerbutton.cpp b/src/duckstation-qt/colorpickerbutton.cpp index 52ed76fee..5bb59030c 100644 --- a/src/duckstation-qt/colorpickerbutton.cpp +++ b/src/duckstation-qt/colorpickerbutton.cpp @@ -39,7 +39,9 @@ void ColorPickerButton::onClicked() const QColor initial(QColor::fromRgb(red, green, blue)); const QColor selected(QColorDialog::getColor(initial, QtUtils::GetRootWidget(this), tr("Select LED Color"))); - if (initial == selected) + + // QColorDialog returns Invalid on cancel, and apparently initial == Invalid is true... + if (!selected.isValid() || initial == selected) return; const u32 new_rgb = (static_cast(selected.red()) << 16) | (static_cast(selected.green()) << 8) |