Check the grid exists before trying to remove weight when removing items.

This commit is contained in:
Marco Pesenti Gritti
2007-05-11 23:10:07 +02:00
parent d319ac192d
commit b0c2f0313f
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -114,7 +114,8 @@ class SpreadBox(hippo.CanvasBox, hippo.CanvasItem):
def remove_item(self, item):
info = item.get_data('item-info')
info.remove_weight(self._grid)
if self._grid:
info.remove_weight(self._grid)
self.remove(item)