Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/graphics
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-10-15 20:11:10 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-11-23 16:14:36 (GMT)
commit0521234fec3de6f0cd98b1d666cdf351b72f7b48 (patch)
treed1ac345dbbaee10b0b9da4533fce20dd86f58950 /src/sugar/graphics
parent05fd5fe2d736416db9b10436cab00446f20b0cae (diff)
CellRendererInvoker._redraw_path(): assure column is defined
We know that our code is correct and column should always be assigned, but it never hurts to act defensively and guard against bugs in other pieces of the code (or other components like GTK). Reviewed-by: James Cameron <quozl@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
Diffstat (limited to 'src/sugar/graphics')
-rw-r--r--src/sugar/graphics/palettewindow.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index 991acc8..ee9be96 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -938,9 +938,11 @@ class CellRendererInvoker(Invoker):
self.notify_mouse_leave()
def _redraw_path(self, path):
+ column = None
for column in self._tree_view.get_columns():
if self._cell_renderer in column.get_cell_renderers():
break
+ assert column is not None
area = self._tree_view.get_background_area(path, column)
x, y = \
self._tree_view.convert_bin_window_to_widget_coords(area.x, area.y)