diff --git a/plugins/idaskins/plugin.py b/plugins/idaskins/plugin.py index a908d49..ca9d7e5 100644 --- a/plugins/idaskins/plugin.py +++ b/plugins/idaskins/plugin.py @@ -124,8 +124,8 @@ def apply_stylesheet(self, abs_theme_dir, manifest): def apply_stylesheet_from_settings(self): theme_dir = self._settings.selected_theme_dir - abs_theme_dir = os.path.join(THEMES_DIR, theme_dir) if theme_dir: + abs_theme_dir = os.path.join(THEMES_DIR, theme_dir) try: manifest = ThemeManifest(open(os.path.join( abs_theme_dir, 'manifest.json' diff --git a/plugins/idaskins/settings.py b/plugins/idaskins/settings.py index 5601be4..a4bf2a7 100644 --- a/plugins/idaskins/settings.py +++ b/plugins/idaskins/settings.py @@ -12,7 +12,8 @@ def __init__(self): @property def selected_theme_dir(self): - return self._settings.value(SELECTED_THEME_DIR_KEY, None).encode() + theme_dir = self._settings.value(SELECTED_THEME_DIR_KEY, None) + return None if theme_dir is None else theme_dir.encode() @selected_theme_dir.setter def selected_theme_dir(self, v):