Skip to content

Commit

Permalink
Allow null containers in the ShortestPaths tool
Browse files Browse the repository at this point in the history
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
johnmay authored and egonw committed Jun 10, 2013
1 parent 4597f69 commit 31ad98b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/org/openscience/cdk/graph/ShortestPaths.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public ShortestPaths(IAtomContainer container, IAtom start) {
this.precedes = new boolean[n];

// skip computation for empty molecules
if (container.isEmpty())
if (n == 0)
return;
if (start == -1)
throw new IllegalArgumentException("invalid vertex start - atom not found container");
Expand Down

0 comments on commit 31ad98b

Please sign in to comment.