From 12c6fe7d9840b18969737fa982d188fadd217cf6 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 14 Oct 2001 13:05:52 +0000 Subject: [PATCH] Fixed EventEdit crash when passed a None event (for adding a new event) svn: r467 --- gramps/src/EventEdit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/src/EventEdit.py b/gramps/src/EventEdit.py index 58d0bd8ed..fd1ad4a68 100644 --- a/gramps/src/EventEdit.py +++ b/gramps/src/EventEdit.py @@ -50,7 +50,10 @@ class EventEditor: self.parent = parent self.event = event self.trans = trans - self.srcreflist = self.event.getSourceRefList() + if event: + self.srcreflist = self.event.getSourceRefList() + else: + self.srcreflist = [] self.top = libglade.GladeXML(const.dialogFile, "event_edit") self.window = self.top.get_widget("event_edit") self.name_field = self.top.get_widget("eventName")