From fe61295ec5920ca2a404c8cf67e2383a6580cd3d Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 30 Dec 2007 17:43:19 +0000 Subject: [PATCH] Protect against bad gadget.ini svn: r9643 --- src/DataViews/MyGrampsView.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DataViews/MyGrampsView.py b/src/DataViews/MyGrampsView.py index c4820b87d..10eb4ec0b 100644 --- a/src/DataViews/MyGrampsView.py +++ b/src/DataViews/MyGrampsView.py @@ -874,6 +874,9 @@ class MyGrampsView(PageView.PageView): def add_gadget(self, obj): name = obj.get_child().get_label() all_opts = get_gadget_options_by_name(name) + if all_opts == None: + print "Unknown gadget type: '%s'; bad gadgets.ini file?" % name + return if "title" not in all_opts: all_opts["title"] = "Untitled Gadget" # uniqify titles: