gtk.gdk.pixbuf.get_from_drawable can return None in many occasions (patch from Reinier Heeres).
This commit is contained in:
parent
8fab49b64e
commit
bbbea6167d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user