Skip to content

Commit 8728ea0

Browse files
authored
Revert "Crashes Excel.exe on start up of VBA Editor #2177"
1 parent 72f74fb commit 8728ea0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

RetailCoder.VBE/Inspections/UseMeaningfulNameInspection.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.IO;
34
using System.Linq;
45
using Rubberduck.Parsing.Symbols;
56
using Rubberduck.Parsing.VBA;
@@ -26,8 +27,13 @@ public UseMeaningfulNameInspection(IMessageBox messageBox, RubberduckParserState
2627

2728
public override IEnumerable<InspectionResultBase> GetInspectionResults()
2829
{
29-
var settings = _settings.Load(new CodeInspectionSettings()) ?? new CodeInspectionSettings();
30-
var whitelistedNames = settings.WhitelistedIdentifiers.Select(s => s.Identifier).ToList();
30+
var whitelistedNames = new List<string>();
31+
32+
try
33+
{
34+
whitelistedNames = _settings.Load(new CodeInspectionSettings()).WhitelistedIdentifiers.Select(s => s.Identifier).ToList();
35+
}
36+
catch (IOException) { }
3137

3238
var issues = UserDeclarations
3339
.Where(declaration => declaration.DeclarationType != DeclarationType.ModuleOption &&

0 commit comments

Comments
 (0)