Skip to content

Commit

Permalink
Do not try to clone the atom if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Apr 24, 2010
1 parent 7b9d84e commit 9672df0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/org/openscience/cdk/AtomContainer.java
Expand Up @@ -1612,7 +1612,9 @@ public Object clone() throws CloneNotSupportedException {
for (int i = 0; i < getLonePairCount(); ++i) {
lp = getLonePair(i);
newLp = (ILonePair)lp.clone();
newLp.setAtom(clone.getAtom(getAtomNumber(lp.getAtom())));
if (lp.getAtom() != null) {
newLp.setAtom(clone.getAtom(getAtomNumber(lp.getAtom())));
}
clone.addLonePair(newLp);
}
ISingleElectron se;
Expand Down

0 comments on commit 9672df0

Please sign in to comment.