Skip to content

Commit

Permalink
test file existing before preview
Browse files Browse the repository at this point in the history
  • Loading branch information
haifengl committed May 3, 2017
1 parent fadc6a7 commit 8453df8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plot/src/main/java/smile/swing/FileChooser.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ public void loadPreview() {
return;
}

if (!file.exists()) return;

if (SimpleFileFilter.readableImageFilter.accept(file)) {
try {
img = ImageIO.read(file);
Expand Down

0 comments on commit 8453df8

Please sign in to comment.