summaryrefslogtreecommitdiff
path: root/src/photos
diff options
context:
space:
mode:
Diffstat (limited to 'src/photos')
-rw-r--r--src/photos/WebPSupport.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/photos/WebPSupport.vala b/src/photos/WebPSupport.vala
index 2f4723c..b467b24 100644
--- a/src/photos/WebPSupport.vala
+++ b/src/photos/WebPSupport.vala
@@ -183,7 +183,13 @@ private class WebpSniffer : PhotoFileSniffer {
if (calc_md5)
detected.md5 = md5_checksum.get_string();
+ // We have never reached the header parsing state, but also didn't encounter any error
+ if (detected.file_format != PhotoFileFormat.WEBP) {
+ return null;
+ }
+
return detected;
+
}
}