Explorar el Código

Fixed crash on missing iso exif data

Martijn Braam hace 3 años
padre
commit
2cdd7a2b3c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      postprocess.c

+ 2 - 1
postprocess.c

@@ -307,8 +307,9 @@ read_exif(char *filename)
 
     if (TIFFGetField(im, EXIFTAG_PHOTOGRAPHICSENSITIVITY, &value_count, &short_array) != 1) {
         err("failed to read EXIFTAG_PHOTOGRAPHICSENSITIVITY");
+    }else {
+        imagedata.isospeed = short_array[0];
     }
-    imagedata.isospeed = short_array[0];
 
     if (TIFFGetField(im, EXIFTAG_FNUMBER, &imagedata.fnumber) != 1) {
         err("failed to read EXIFTAG_FNUMBER");