diff options
Diffstat (limited to 'thumbnailer/shotwell-video-thumbnailer.vala')
-rw-r--r-- | thumbnailer/shotwell-video-thumbnailer.vala | 7 |
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, |