diff options
author | flavio <fdanesse@gmail.com> | 2013-03-22 20:17:57 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2013-03-24 09:11:55 (GMT) |
commit | 09454b3e4e85caf05c2dd3824608f1cd662f6ad5 (patch) | |
tree | fc5e29f02b14234bb6adaf1508f2474d019c75f1 | |
parent | d5dddee8995c0e1a2cac6e561b08c171b65f1f93 (diff) |
If the user has not created a sequence of images, Take snapshot throws an error.
-rw-r--r-- | montage.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -119,12 +119,13 @@ class View(gtk.EventBox): def exportframe(self): self.frames = kinematic.makeframes() - fsecs = self.frames.keys() - firstpixindex = fsecs[0] + if not self.frames: + return + firstpixindex = self.frames.keys()[0] x, y, width, height = self.mfdraw.get_allocation() pixmap = gtk.gdk.Pixmap(self.mfdraw.window, width, height) - self._draw_frame(fsecs[0], pixmap) + self._draw_frame(firstpixindex, pixmap) pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, width, height) gtk.gdk.Pixbuf.get_from_drawable(pixbuf, pixmap, pixmap.get_colormap(), 0, 0, 0, 0, width, height) |