Changeset 5759 for branches/4.1


Ignore:
Timestamp:
12/23/09 15:49:45 (10 years ago)
Author:
melissa
Message:

Prevent an NPE if the EXIF IFD is invalid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/src/loci/formats/in/BaseTiffReader.java

    r5275 r5759  
    137137    if (exifOffset != 0) { 
    138138      IFD exif = tiffParser.getIFD(1, exifOffset); 
    139  
    140       for (Integer key : exif.keySet()) { 
    141         int k = key.intValue(); 
    142         addGlobalMeta(getExifTagName(k), exif.get(key)); 
     139      if (exif != null) { 
     140        for (Integer key : exif.keySet()) { 
     141          int k = key.intValue(); 
     142          addGlobalMeta(getExifTagName(k), exif.get(key)); 
     143        } 
    143144      } 
    144145    } 
Note: See TracChangeset for help on using the changeset viewer.