Skip to content

Commit

Permalink
Check for a null major isotope, which happens with R-groups
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
gilleain authored and rajarshi committed Oct 5, 2010
1 parent 8d72fe4 commit 6fdb866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/org/openscience/cdk/smiles/SmilesGenerator.java
Expand Up @@ -1825,7 +1825,7 @@ private String generateMassString(IAtom a)
}

IIsotope majorIsotope = isotopeFactory.getMajorIsotope(a.getSymbol());
if (majorIsotope.getMassNumber() == a.getMassNumber())
if (majorIsotope == null || majorIsotope.getMassNumber() == a.getMassNumber())
{
return "";
} else if (a.getMassNumber() == null)
Expand Down

0 comments on commit 6fdb866

Please sign in to comment.