diff --git a/sugar/graphics/canvasicon.py b/sugar/graphics/canvasicon.py index d50e9f90..14f83519 100644 --- a/sugar/graphics/canvasicon.py +++ b/sugar/graphics/canvasicon.py @@ -369,6 +369,11 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): if not self._popup: return + if not self.get_context(): + # If we have been detached from our parent, don't show up the popup + # in this case. + return + popup_context = self.get_popup_context() [x, y] = [None, None]