Fixed inhertiance manager crashing if there is no parent

This commit is contained in:
Jaime van Kessel 2017-04-24 13:05:39 +02:00
parent 2fda85a6aa
commit 2297a6e80b

View file

@ -109,8 +109,11 @@ class SettingInheritanceManager(QObject):
self._settings_with_inheritance_warning.remove(key)
settings_with_inheritance_warning_changed = True
# Find the topmost parent (Assumed to be a category)
parent = definitions[0].parent
if parent is None:
return
# Find the topmost parent (Assumed to be a category)
while parent.parent is not None:
parent = parent.parent