gtk.gdk.pixbuf.get_from_drawable can return None in many occasions (patch from Reinier Heeres).

This commit is contained in:
Tomeu Vizoso 2007-07-11 11:02:43 +02:00
parent 8fab49b64e
commit bbbea6167d

View File

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