From e591d9aa80a2ccbf90bac2f61b540c949f69bad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Mon, 15 Oct 2012 10:53:18 -0300 Subject: [PATCH] CanvasIcon: check if we have a palette in the button release callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The buddy icon in the home view has the mouse pointer inside at boot, moving the pointer outside provokes an error because the icon doesn't have a palette attached yet. Signed-off-by: Manuel QuiƱones Acked-by: Simon Schampijer --- src/sugar3/graphics/icon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 2d9c5314..95a72b82 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -721,7 +721,7 @@ class CanvasIcon(EventIcon): self.set_state(Gtk.StateFlags.PRELIGHT) def __leave_notify_event_cb(self, icon, event): - if self.palette.is_up(): + if self.palette and self.palette.is_up(): return self._in_prelight_state = False