diff --git a/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java b/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java index 67fe187..e026cce 100644 --- a/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java +++ b/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java @@ -154,16 +154,21 @@ */ @SuppressWarnings("UseSpecificCatch") public void imageView_Action() { - String path = basetime.getImageFile().getImageFile().getAbsolutePath(); + try { + String path = basetime.getImageFile().getImageFile().getAbsolutePath(); - // View Image File - int size_x = imageSPane.getWidth() - 8; - ImageIcon tmpIcon = new ImageIcon(path); - refImage = tmpIcon; - if (tmpIcon.getIconWidth() > size_x) { - refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT)); + // View Image File + int size_x = imageSPane.getWidth() - 8; + ImageIcon tmpIcon = new ImageIcon(path); + refImage = tmpIcon; + if (tmpIcon.getIconWidth() > size_x) { + refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT)); + } + imageLabel.setIcon(refImage); } - imageLabel.setIcon(refImage); + catch(NullPointerException e) { + // 何もしない + } repaint(); }