From 5afe6b2418a650a596953cef25b9421c691471c0 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 --- src/EventEdit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/EventEdit.py b/src/EventEdit.py index 58d0bd8ed..fd1ad4a68 100644 --- a/src/EventEdit.py +++ b/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")