Skip to content

Commit 5f44ba9

Browse files
authored
Fix a null dereference when an invalid cast exception has no inner exception (#729)
1 parent 06d3c22 commit 5f44ba9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/PowerShellEditorServices/Console/InputPromptHandler.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ private async Task<Dictionary<string, object>> StartPromptLoop(
275275
}
276276
catch (PSInvalidCastException e)
277277
{
278-
this.ShowErrorMessage(e.InnerException);
279-
278+
this.ShowErrorMessage(e.InnerException ?? e);
280279
continue;
281280
}
282281
}

0 commit comments

Comments
 (0)