Skip to content

Commit 7d9791e

Browse files
committed
Need to remove reference.
1 parent b64322a commit 7d9791e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • tool/smarts/src/main/java/org/openscience/cdk/smarts

tool/smarts/src/main/java/org/openscience/cdk/smarts/Smarts.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,8 @@ else if (num == 0)
11811181
if (!new Parser(submol, str.substring(beg, end - 1), flav).parse())
11821182
return false;
11831183
if (submol.getAtomCount() == 1) {
1184-
expr = ((QueryAtom) submol.getAtom(0)).getExpression();
1184+
expr = ((QueryAtom) AtomRef.deref(submol.getAtom(0)))
1185+
.getExpression();
11851186
} else {
11861187
expr = new Expr(Expr.Type.RECURSIVE, submol);
11871188
}
@@ -1584,7 +1585,7 @@ boolean finish() {
15841585
markReactionRoles();
15851586
for (IAtom atom : mol.atoms()) {
15861587
ReactionRole role = atom.getProperty(CDKConstants.REACTION_ROLE);
1587-
((QueryAtom) atom).getExpression().and(
1588+
((QueryAtom) AtomRef.deref(atom)).getExpression().and(
15881589
new Expr(Expr.Type.REACTION_ROLE,
15891590
role.ordinal())
15901591
);

0 commit comments

Comments
 (0)