diff --git a/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java b/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java index d90c2967b0..2f53928baa 100644 --- a/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java +++ b/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java @@ -1133,7 +1133,7 @@ private static final class LayoutBackup { public LayoutBackup(IAtomContainer mol) { final int numAtoms = mol.getAtomCount(); - final int numBonds = mol.getAtomCount(); + final int numBonds = mol.getBondCount(); this.coords = new Point2d[numAtoms]; this.btypes = new IBond.Stereo[numBonds]; this.mol = mol; @@ -1151,7 +1151,7 @@ public LayoutBackup(IAtomContainer mol) { void reset() { final int numAtoms = mol.getAtomCount(); - final int numBonds = mol.getAtomCount(); + final int numBonds = mol.getBondCount(); for (int i = 0; i < numAtoms; i++) mol.getAtom(i).setPoint2d(coords[i]); for (int i = 0; i < numBonds; i++)