* src/ScratchPad.py: check for null model

svn: r6891
This commit is contained in:
Don Allingham
2006-06-15 04:29:47 +00:00
parent 26f17e296e
commit fc74ec2662
2 changed files with 5 additions and 3 deletions

View File

@ -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.