From 0d66b3cb9fc1f6dbd7ca409e204d594276e51717 Mon Sep 17 00:00:00 2001 From: tcarver <tjc> Date: Thu, 5 Jan 2012 11:59:11 +0000 Subject: [PATCH] handle cancel save dialog --- uk/ac/sanger/artemis/components/variant/IOUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uk/ac/sanger/artemis/components/variant/IOUtils.java b/uk/ac/sanger/artemis/components/variant/IOUtils.java index 4e5ad47cb..a5565df5b 100644 --- a/uk/ac/sanger/artemis/components/variant/IOUtils.java +++ b/uk/ac/sanger/artemis/components/variant/IOUtils.java @@ -91,6 +91,8 @@ class IOUtils try { File filterFile = getFile(vcfFileName, nfiles, ".filter", null); + if(filterFile == null) + return null; FileWriter writer = new FileWriter(filterFile); AbstractVCFReader.write(vcfFileName, writer, vcfView, features); @@ -150,6 +152,8 @@ class IOUtils for(int i=0; i<vcfFiles.size(); i++) { File filterFile = IOUtils.writeVCF(vcfFiles.get(i), vcfView, features, vcfFiles.size()); + if(filterFile == null) + return; filterFiles += filterFile.getAbsolutePath()+"\n"; } -- GitLab