Skip to content

Commit a30a09d

Browse files
authored
Merge pull request #1 from kerzhaw/working
Fix for #2177: Crashes Excel.exe on start up of VBA Editor
2 parents c1b0686 + 9cf7b14 commit a30a09d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

RetailCoder.VBE/Inspections/UseMeaningfulNameInspection.cs

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

2827
public override IEnumerable<InspectionResultBase> GetInspectionResults()
2928
{
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) { }
29+
var settings = _settings.Load(new CodeInspectionSettings()) ?? new CodeInspectionSettings();
30+
var whitelistedNames = settings.WhitelistedIdentifiers.Select(s => s.Identifier).ToList();
3731

3832
var issues = UserDeclarations
3933
.Where(declaration => declaration.DeclarationType != DeclarationType.ModuleOption &&

0 commit comments

Comments
 (0)