We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4a6301 commit 078f5a4Copy full SHA for 078f5a4
Rubberduck.VBEEditor/SafeComWrappers/ComWrapperEnumerator.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
+using System.Linq;
5
6
namespace Rubberduck.VBEditor.SafeComWrappers
7
{
@@ -13,7 +14,9 @@ public class ComWrapperEnumerator<TWrapperItem> : IEnumerator<TWrapperItem>
13
14
public ComWrapperEnumerator(IEnumerable source, Func<object, TWrapperItem> itemWrapper)
15
16
_itemWrapper = itemWrapper;
- _internal = source.GetEnumerator();
17
+ _internal = source == null
18
+ ? Enumerable.Empty<TWrapperItem>().GetEnumerator()
19
+ : source.GetEnumerator();
20
}
21
22
public void Dispose()
0 commit comments