mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
catch wrong objects in add-on conf
based on patch from Arthur: https://github.com/dae/anki/pull/261/files
This commit is contained in:
parent
204ed5c18a
commit
e4af18cf66
1 changed files with 4 additions and 0 deletions
|
@ -499,6 +499,10 @@ class ConfigEditor(QDialog):
|
|||
showInfo(_("Invalid configuration: ") + repr(e))
|
||||
return
|
||||
|
||||
if not isinstance(new_conf, dict):
|
||||
showInfo(_("Invalid configuration: top level object must be a map"))
|
||||
return
|
||||
|
||||
if new_conf != self.conf:
|
||||
self.mgr.writeConfig(self.addon, new_conf)
|
||||
# does the add-on define an action to be fired?
|
||||
|
|
Loading…
Reference in a new issue