From ba8bbc4d08eda07e8866664449c54f389ede433d Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 15 Jun 2006 04:29:47 +0000 Subject: [PATCH] * src/ScratchPad.py: check for null model svn: r6891 --- gramps2/ChangeLog | 1 + gramps2/src/ScratchPad.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5fce6057a..7f81615cc 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,5 @@ 2006-06-14 Don Allingham + * src/ScratchPad.py: check for null model * src/GrampsDb/_ReadGedcom.py: fix INT date format 2006-06-14 Alex Roitman diff --git a/gramps2/src/ScratchPad.py b/gramps2/src/ScratchPad.py index b81d5a6e1..46eb5cfac 100644 --- a/gramps2/src/ScratchPad.py +++ b/gramps2/src/ScratchPad.py @@ -743,9 +743,10 @@ class ScratchPadListView: def remove_invalid_objects(self,dummy=None): model = self._widget.get_model() - for o in model: - if not o.is_valid(): - model.remove(o) + if model: + for o in model: + if not o.is_valid(): + model.remove(o) # Method to manage the wrapper classes.