File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Rubberduck.Parsing/Symbols Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,8 @@ public string CustomFolder
463
463
464
464
public bool Equals ( Declaration other )
465
465
{
466
- return other . Project == Project
466
+ return other != null
467
+ && other . Project == Project
467
468
&& other . IdentifierName == IdentifierName
468
469
&& other . DeclarationType == DeclarationType
469
470
&& other . Scope == Scope
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . CodeDom . Compiler ;
3
2
using System . Collections . Generic ;
4
- using System . Configuration ;
5
3
using System . Linq ;
6
4
using Antlr4 . Runtime ;
7
5
using Rubberduck . Parsing . Grammar ;
@@ -637,9 +635,11 @@ private Declaration ResolveInternal(VBAParser.ICS_B_ProcedureCallContext context
637
635
}
638
636
639
637
var reference = CreateReference ( identifierContext , callee ) ;
640
- callee . AddReference ( reference ) ;
641
- _alreadyResolved . Add ( reference . Context ) ;
642
-
638
+ if ( reference != null )
639
+ {
640
+ callee . AddReference ( reference ) ;
641
+ _alreadyResolved . Add ( reference . Context ) ;
642
+ }
643
643
return callee ;
644
644
}
645
645
@@ -730,8 +730,11 @@ public void Resolve(VBAParser.ICS_S_MembersCallContext context)
730
730
var identifierContext = ( ( dynamic ) parent . Context ) . ambiguousIdentifier ( ) as VBAParser . AmbiguousIdentifierContext ;
731
731
732
732
var parentReference = CreateReference ( identifierContext , parent ) ;
733
- parent . AddReference ( parentReference ) ;
734
- _alreadyResolved . Add ( parentReference . Context ) ;
733
+ if ( parentReference != null )
734
+ {
735
+ parent . AddReference ( parentReference ) ;
736
+ _alreadyResolved . Add ( parentReference . Context ) ;
737
+ }
735
738
}
736
739
737
740
var chainedCalls = context . iCS_S_MemberCall ( ) ;
You can’t perform that action at this time.
0 commit comments