Ignore:
Timestamp:
2015-07-27T14:52:11+02:00 (9 years ago)
Author:
floscher
Message:

Don't throw an exception in MapillaryImportedImage.getImage() when file==null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java

    r31390 r31410  
    6363   * Returns the pictures of the file.
    6464   *
    65    * @return A BufferedImage object containing the pictures.
     65   * @return A BufferedImage object containing the picture,
     66   *           or null if the {@link File} given in the constructor was null.
    6667   * @throws IOException
    67    * @throws IllegalArgumentException
    68    *           if file is currently set to null
    6968   */
    7069  public BufferedImage getImage() throws IOException {
    71     return ImageIO.read(file);
     70    return file == null ? null : ImageIO.read(file);
    7271  }
    7372
Note: See TracChangeset for help on using the changeset viewer.