Skip to content

Commit 7ae2b76

Browse files
committed
C#: Relax the condition for when a qualified expression might be null.
1 parent 33fc2ba commit 7ae2b76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ private Expr maybeNullExpr(Expr reason) {
4747
result =
4848
any(QualifiableExpr qe |
4949
qe.isConditional() and
50-
qe.getQualifier() = maybeNullExpr(reason)
50+
reason = qe.getQualifier() and
51+
not qe instanceof AssignableWrite
5152
)
5253
}
5354

0 commit comments

Comments
 (0)