Skip to content

Commit 80e1347

Browse files
committed
Fix NRE if the user com project for a document module does not exist
An appropriate guard clause was missing in the previous two commits.
1 parent 650d563 commit 80e1347

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Rubberduck.Parsing/VBA/ReferenceManagement/ReferenceResolveRunnerBase.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses;
1515
using Rubberduck.VBEditor;
1616
using Rubberduck.VBEditor.Extensions;
17-
using Rubberduck.VBEditor.SafeComWrappers;
1817

1918
namespace Rubberduck.Parsing.VBA.ReferenceManagement
2019
{
@@ -174,6 +173,12 @@ private void AddSuperTypeNamesForDocumentModules(IReadOnlyCollection<QualifiedMo
174173
foreach (var projectGroup in documentModuleDeclarationsByProject)
175174
{
176175
var userComProject = userComProjectProvider.UserProject(projectGroup.Key);
176+
177+
if (userComProject == null)
178+
{
179+
continue;
180+
}
181+
177182
var documents = projectGroup.ToDictionary(module => module.IdentifierName);
178183
foreach (var comModule in userComProject.Members)
179184
{

0 commit comments

Comments
 (0)