Skip to content

Commit 4e456f0

Browse files
authored
Fix NullReferenceException when processing event subscribers (#3781)
1 parent d7b9f82 commit 4e456f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PSReadLine/ReadLine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ internal static PSKeyInfo ReadKey()
210210
bool runPipelineForEventProcessing = false;
211211
foreach (var sub in eventSubscribers)
212212
{
213-
if (sub.SourceIdentifier.Equals(PSEngineEvent.OnIdle, StringComparison.OrdinalIgnoreCase))
213+
if (string.Equals(sub.SourceIdentifier, PSEngineEvent.OnIdle, StringComparison.OrdinalIgnoreCase))
214214
{
215215
// If the buffer is not empty, let's not consider we are idle because the user is in the middle of typing something.
216216
if (_singleton._buffer.Length > 0)

0 commit comments

Comments
 (0)