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>
This commit is contained in:
Manuel Quiñones 2012-10-15 10:53:18 -03:00
parent f91cfbfc8a
commit e591d9aa80

View File

@ -721,7 +721,7 @@ class CanvasIcon(EventIcon):
self.set_state(Gtk.StateFlags.PRELIGHT) self.set_state(Gtk.StateFlags.PRELIGHT)
def __leave_notify_event_cb(self, icon, event): def __leave_notify_event_cb(self, icon, event):
if self.palette.is_up(): if self.palette and self.palette.is_up():
return return
self._in_prelight_state = False self._in_prelight_state = False