Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/montage.py
diff options
context:
space:
mode:
Diffstat (limited to 'montage.py')
-rw-r--r--montage.py7
1 files changed, 4 insertions, 3 deletions
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)