Fixed EventEdit crash when passed a None event (for adding a new event)

svn: r467
This commit is contained in:
Don Allingham 2001-10-14 13:05:52 +00:00
parent a3f70f86b8
commit 12c6fe7d98

View File

@ -50,7 +50,10 @@ class EventEditor:
self.parent = parent self.parent = parent
self.event = event self.event = event
self.trans = trans 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.top = libglade.GladeXML(const.dialogFile, "event_edit")
self.window = self.top.get_widget("event_edit") self.window = self.top.get_widget("event_edit")
self.name_field = self.top.get_widget("eventName") self.name_field = self.top.get_widget("eventName")