From 7cf4db831527d98e045bbe3b540ef576befb2393 Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <sebastian.koslowski@gmail.com>
Date: Sat, 16 May 2020 22:01:02 +0200
Subject: [PATCH] grc: fix dark theme detection

Index: grc/gui/ParamWidgets.py
--- grc/gui/ParamWidgets.py.orig
+++ grc/gui/ParamWidgets.py
@@ -35,7 +35,7 @@ def have_dark_theme():
         """
         Check if a theme is dark based on its name.
         """
-        return theme_name in Constants.GTK_DARK_THEMES or "dark" in theme_name.lower()
+        return theme_name and (theme_name in Constants.GTK_DARK_THEMES or "dark" in theme_name.lower())
     # GoGoGo
     config = configparser.ConfigParser()
     config.read(os.path.expanduser(Constants.GTK_SETTINGS_INI_PATH))
