From 09454b3e4e85caf05c2dd3824608f1cd662f6ad5 Mon Sep 17 00:00:00 2001 From: flavio Date: Fri, 22 Mar 2013 20:17:57 +0000 Subject: If the user has not created a sequence of images, Take snapshot throws an error. --- diff --git a/montage.py b/montage.py index 4664bb2..ee0facf 100644 --- a/montage.py +++ b/montage.py @@ -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) -- cgit v0.9.1