Skip to content

Commit 7893723

Browse files
committed
Skip null bonds in max bond order calculation.
1 parent 8008c68 commit 7893723

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ private IAtomType perceiveCarbons(IAtomContainer atomContainer, IAtom atom,
494494
private Order getMaximumBondOrder(List<IBond> connectedBonds) {
495495
IBond.Order max = IBond.Order.SINGLE;
496496
for (IBond bond : connectedBonds) {
497-
if (bond.getOrder().numeric() > max.numeric())
497+
if (bond.getOrder() != null && bond.getOrder().numeric() > max.numeric())
498498
max = bond.getOrder();
499499
}
500500
return max;

0 commit comments

Comments
 (0)