summaryrefslogtreecommitdiff
path: root/thumbnailer/shotwell-video-thumbnailer.vala
diff options
context:
space:
mode:
Diffstat (limited to 'thumbnailer/shotwell-video-thumbnailer.vala')
-rw-r--r--thumbnailer/shotwell-video-thumbnailer.vala12
1 files changed, 7 insertions, 5 deletions
diff --git a/thumbnailer/shotwell-video-thumbnailer.vala b/thumbnailer/shotwell-video-thumbnailer.vala
index 5974934..b6bdbed 100644
--- a/thumbnailer/shotwell-video-thumbnailer.vala
+++ b/thumbnailer/shotwell-video-thumbnailer.vala
@@ -126,12 +126,14 @@ class ShotwellThumbnailer {
}
}
- // Save the pixbuf.
- if (direction != Gdk.PixbufRotation.NONE) {
- pixbuf = pixbuf.rotate_simple(direction);
+ if (pixbuf != null) {
+ // Save the pixbuf.
+ if (direction != Gdk.PixbufRotation.NONE) {
+ pixbuf = pixbuf.rotate_simple(direction);
+ }
+ pixbuf.save_to_buffer(out pngdata, "png");
+ out.write(pngdata);
}
- pixbuf.save_to_buffer(out pngdata, "png");
- out.write(pngdata);
// cleanup and exit.
pipeline.set_state(Gst.State.NULL);