Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added null check before input close. If the reader was created with a…

… URL the input is never created and invoking '.close()' will throw a null pointer exception
  • Loading branch information...
1 parent bd922f6 commit 345c0be7d1820168dc9970074d7cde17cfc5b6b3 @johnmay johnmay committed with egonw
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/main/org/openscience/cdk/io/
3  src/main/org/openscience/cdk/io/
@@ -246,7 +246,8 @@ private IChemFile readChemFile(IChemFile file) throws CDKException {
public void close() throws IOException {
- input.close();
+ if(input != null)
+ input.close();

0 comments on commit 345c0be

Please sign in to comment.
Something went wrong with that request. Please try again.