Hi,

I have trouble closing my activity under sugar-jhbuild. Seems to be related to the _get_preview function (should I do anything for that?). Anyway, the attached patch fixes the problem.

Cheers,
Reinier
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py
index 8a97199..3587795 100644
--- a/sugar/activity/activity.py
+++ b/sugar/activity/activity.py
@@ -312,6 +312,8 @@ class Activity(Window, gtk.Container):
 
     def _get_preview(self):
         preview_pixbuf = self.get_canvas_screenshot()
+        if preview_pixbuf is None:
+            return None
         preview_pixbuf = preview_pixbuf.scale_simple(units.grid_to_pixels(4),
                                                      units.grid_to_pixels(3),
                                                      gtk.gdk.INTERP_BILINEAR)
_______________________________________________
Sugar mailing list
[email protected]
http://lists.laptop.org/listinfo/sugar

Reply via email to