src/eric7/EricWidgets/EricIconBar.py

branch
eric7
changeset 9951
91faf698afe6
parent 9653
e67609152c5e
child 10278
e26fa3b06f4f
diff -r 9e2fcf4efa37 -r 91faf698afe6 src/eric7/EricWidgets/EricIconBar.py
--- a/src/eric7/EricWidgets/EricIconBar.py	Wed Mar 29 19:10:30 2023 +0200
+++ b/src/eric7/EricWidgets/EricIconBar.py	Fri Mar 31 09:50:16 2023 +0200
@@ -218,9 +218,13 @@
 
         label = self.__layout.itemAt(self.__currentIndex)
         if label:
-            label.widget().setStyleSheet(
-                EricIconBar.LabelStyleSheetTemplate.format(self.__highlightColor.name())
-            )
+            widget = label.widget()
+            if widget:
+                widget.setStyleSheet(
+                    EricIconBar.LabelStyleSheetTemplate.format(
+                        self.__highlightColor.name()
+                    )
+                )
 
     def color(self):
         """

eric ide

mercurial