summaryrefslogtreecommitdiff
path: root/thumbnailer
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-11-02 09:59:18 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-11-02 09:59:18 +0100
commit4617ab53df0f5c30e7120e667d2f845c0e7eee9a (patch)
tree5c531fab7188fa4ed9f2050ac69f1a28e88aeac4 /thumbnailer
parent3974fbe1ef2f54cfd5fd06bd37d93966c458e96c (diff)
parent2785a691b958a79a1dd606c445188c71c3f58b3c (diff)
New upstram release 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,