Skip to content

Commit

Permalink
fix: NRE in TextBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Sep 5, 2024
1 parent 2ca340f commit aef9aa3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public override void Draw(CGRect rect)
_attributedString?.DrawString(_drawRect, NSStringDrawingOptions.UsesLineFragmentOrigin, null);
}

UpdateIsTextTrimmed();
if (_attributedString is not null)
{
UpdateIsTextTrimmed();
}
}

/// <summary>
Expand Down

0 comments on commit aef9aa3

Please sign in to comment.