Skip to content

Commit 66171b4

Browse files
authored
Merge pull request #22724 from ramezgerges/text_trimming_enumeration_crash
2 parents d29da14 + 26d1f99 commit 66171b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Uno.UI/UI/Xaml/Documents/UnicodeText.skia.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ internal unsafe UnicodeText(
519519
while (trimPoint.Value is { containsOnlyWhitespace: true, containsTab: false } && trimPoint.Value.start > line.start)
520520
{
521521
trimPoint = trimPoint.Previous!;
522-
if (enumerator.Current == trimPoint)
522+
if (hasMore && enumerator.Current == trimPoint)
523523
{
524524
hasMore = enumerator.MoveNext();
525525
}

0 commit comments

Comments
 (0)