summaryrefslogtreecommitdiff
path: root/src/direct/DirectPhoto.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-05 04:23:52 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-05 04:23:52 +0200
commitbec5f87053759705fb77bae1aa378f2666c7d153 (patch)
treebd955b9777aa39b207fa161edf19a6609f822909 /src/direct/DirectPhoto.vala
parent1c99a41a296cda6647edc32437a813f6923cb1d0 (diff)
parent4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (diff)
Merge tag 'upstream/0.23.1'
Upstream version 0.23.1
Diffstat (limited to 'src/direct/DirectPhoto.vala')
-rw-r--r--src/direct/DirectPhoto.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/direct/DirectPhoto.vala b/src/direct/DirectPhoto.vala
index 9cd86f9..4016ee2 100644
--- a/src/direct/DirectPhoto.vala
+++ b/src/direct/DirectPhoto.vala
@@ -1,4 +1,4 @@
-/* Copyright 2009-2015 Yorba Foundation
+/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
@@ -121,8 +121,10 @@ public class DirectPhoto : Photo {
}
public override Gdk.Pixbuf? get_thumbnail(int scale) throws Error {
- return (get_metadata().get_preview_count() == 0) ? null :
- get_orientation().rotate_pixbuf(get_metadata().get_preview(0).get_pixbuf());
+ var metadata = get_metadata();
+
+ return (metadata == null || metadata.get_preview_count() == 0) ? null :
+ get_orientation().rotate_pixbuf(metadata.get_preview(0).get_pixbuf());
}
protected override void notify_altered(Alteration alteration) {