X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FImageMaker.java;h=59244ebdfadbaf8b0e8c262a02fa6f8666c9597f;hb=d5b157fc64cc6e5f633a2f7ae991a29b7c557b94;hp=02427f2cb4a08f783d54b4e18ef6cb9e97784a74;hpb=55e2e9b22b133db8b9ff0979b0338a33081fc8fd;p=jalview.git diff --git a/src/jalview/util/ImageMaker.java b/src/jalview/util/ImageMaker.java index 02427f2..59244eb 100755 --- a/src/jalview/util/ImageMaker.java +++ b/src/jalview/util/ImageMaker.java @@ -49,19 +49,22 @@ public class ImageMaker } } - try + if(file!=null) { - out = new FileOutputStream(file); + try + { + out = new FileOutputStream(file); - if (type == EPS) - setupEPS(width, height, EPStitle); - else - setupPNG(width, height); - } - catch (Exception ex) - { - System.out.println("Error creating " + (type == EPS ? "EPS" : "PNG") + - " file."); + if (type == EPS) + setupEPS(width, height, EPStitle); + else + setupPNG(width, height); + } + catch (Exception ex) + { + System.out.println("Error creating " + (type == EPS ? "EPS" : "PNG") + + " file."); + } } }