summaryrefslogtreecommitdiff
path: root/thumbnailer
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-11-02 09:53:10 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-11-02 09:53:10 +0100
commit2785a691b958a79a1dd606c445188c71c3f58b3c (patch)
tree671ec0f07cc8b60529e302aac5348b062f103942 /thumbnailer
parent566dc060676b41e1e58a446b7dcc4159e242fee6 (diff)
Imported Upstream version 0.20.2upstream/0.20.2
Diffstat (limited to 'thumbnailer')
-rw-r--r--thumbnailer/shotwell-video-thumbnailer.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/thumbnailer/shotwell-video-thumbnailer.vala b/thumbnailer/shotwell-video-thumbnailer.vala
index 5b8b89a..93db2aa 100644
--- a/thumbnailer/shotwell-video-thumbnailer.vala
+++ b/thumbnailer/shotwell-video-thumbnailer.vala
@@ -104,7 +104,12 @@ class ShotwellThumbnailer {
buffer = sample.get_buffer();
buffer.map(out mapinfo, Gst.MapFlags.READ);
-
+
+ if (mapinfo.data == null || mapinfo.data.length == 0) {
+ stderr.printf("Could not get snapshot data buffer\n");
+ return 7;
+ }
+
// Create pixmap from buffer and save, gstreamer video buffers have a stride
// that is rounded up to the nearest multiple of 4.
pixbuf = new Gdk.Pixbuf.from_data(mapinfo.data, Gdk.Colorspace.RGB, false, 8,