Skip to content

Commit

Permalink
fix(NavigationBar): Avoid null BitmapIcon.UriSource
Browse files Browse the repository at this point in the history
  • Loading branch information
kazo0 committed Aug 30, 2022
1 parent 66a26ed commit d1fb179
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ protected override void Render()
switch (element.Icon)
{
case BitmapIcon bitmap:
var drawable = DrawableHelper.FromUri(bitmap.UriSource);
native?.SetIcon(drawable);
if (bitmap.UriSource is { } uriSource)
{
var drawable = DrawableHelper.FromUri(uriSource);
native?.SetIcon(drawable);
}
break;

case FontIcon font: // not supported
Expand Down

0 comments on commit d1fb179

Please sign in to comment.