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>
master
Manuel Quiñones 12 years ago
parent f91cfbfc8a
commit e591d9aa80

@ -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

Loading…
Cancel
Save