Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Prevent ArgumentOutOfRangeException #15568

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -237,7 +237,7 @@ internal int ItemsCount()

internal object ElementAt(int index)
{
if (_itemsSource is IList list)
if (_itemsSource is IList list && list.Count > index)
return list[index];

int count = 0;
Expand Down