Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Don't access empty optional of dual color button
Carsten Hartenfels06dfb46e27d3
diff --git a/libs/ui/widgets/KoDualColorButton.cpp b/libs/ui/widgets/KoDualColorButton.cppindex 9ddce966fc..22edff4ace 100644--- a/libs/ui/widgets/KoDualColorButton.cpp+++ b/libs/ui/widgets/KoDualColorButton.cpp@@ -121,7 +121,9 @@ void KoDualColorButton::updateArrows() {}void KoDualColorButton::setColorDialogState(Selection state){- d->colorDialogState->selection = state;+ if (d->colorDialogState.has_value()) {+ d->colorDialogState->selection = state;+ }d->tmpSelection = state;}