Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-10-15 13:53:18 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-10-15 20:24:55 (GMT)
commite591d9aa80a2ccbf90bac2f61b540c949f69bad6 (patch)
tree59b782fb8337e505bdb674f6a2db4ed00c0443cd
parentf91cfbfc8ae4733641dff48cb3923e673fa1b3a3 (diff)
CanvasIcon: check if we have a palette in the button release callback
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 <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/graphics/icon.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 2d9c531..95a72b8 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