Skip to content

Commit 72fcdb2

Browse files
committed
Allow null VBE reference to facilitate easier testing.
1 parent 59ad563 commit 72fcdb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerComponentViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ private void SetName()
102102
switch (qualifiedModuleName.ComponentType)
103103
{
104104
case ComponentType.Document:
105-
106-
using (var app = _vbe.HostApplication())
105+
using (var app = _vbe?.HostApplication())
107106
{
108107
var parenthesized = app?.GetDocument(qualifiedModuleName)?.DocumentName ?? string.Empty;
109108
_name = string.IsNullOrEmpty(parenthesized) ? _name : $"{_name} ({parenthesized})";

0 commit comments

Comments
 (0)