From 0471c554b620e35804409201676aae17074849b7 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sat, 3 Apr 2021 20:18:07 -0400 Subject: [PATCH] rgb_configurator: don't try setting invalid color --- src/main/python/rgb_configurator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/python/rgb_configurator.py b/src/main/python/rgb_configurator.py index 015bd5c..9caf1f9 100644 --- a/src/main/python/rgb_configurator.py +++ b/src/main/python/rgb_configurator.py @@ -125,6 +125,8 @@ class RGBConfigurator(BasicEditor): def on_underglow_color(self): color = QColorDialog.getColor(self.current_color()) + if not color.isValid(): + return self.underglow_color.setStyleSheet("QWidget { background-color: %s}" % color.name()) h, s, v, a = color.getHsvF() if h < 0: