Skip to content

Commit 8fde762

Browse files
committed
Fix NPEs on unresolved references in MixedNamesCheck
1 parent 70738f3 commit 8fde762

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

delphi-checks/src/main/java/au/com/integradev/delphi/checks/MixedNamesCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public DelphiCheckContext visit(NameReferenceNode reference, DelphiCheckContext
4949
NameDeclaration declaration = reference.getNameDeclaration();
5050
NameOccurrence occurrence = reference.getNameOccurrence();
5151

52-
if (occurrence != null) {
52+
if (declaration != null) {
5353
if (declaration instanceof UnitImportNameDeclaration) {
5454
// Checks the occurrence against the original unit declaration instead of the import
5555
// declaration

0 commit comments

Comments
 (0)