Skip to content

Commit 2c952ac

Browse files
authored
Tentative Fix for Issue #3058
1 parent c04519e commit 2c952ac

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Rubberduck.VBEEditor/SafeComWrappers/VBA/Reference.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,22 @@ public string Description
4242

4343
public string FullPath
4444
{
45-
get { return IsBroken ? string.Empty : Target.FullPath; }
45+
get
46+
{
47+
string fullPath;
48+
49+
try
50+
{
51+
fullPath = IsBroken ? string.Empty : Target.FullPath;
52+
}
53+
catch (System.Runtime.InteropServices.COMException)
54+
{
55+
56+
fullPath = string.Empty;
57+
}
58+
59+
return fullPath;
60+
}
4661
}
4762

4863
public bool IsBuiltIn
@@ -92,4 +107,4 @@ public override int GetHashCode()
92107
return IsBroken ? 0 : HashCode.Compute(Type, Name, Guid, FullPath, Major, Minor);
93108
}
94109
}
95-
}
110+
}

0 commit comments

Comments
 (0)