From 2785a691b958a79a1dd606c445188c71c3f58b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Nov 2014 09:53:10 +0100 Subject: Imported Upstream version 0.20.2 --- thumbnailer/shotwell-video-thumbnailer.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'thumbnailer') 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, -- cgit v1.2.3