Skip to content

Commit

Permalink
- add null check for ImageCellRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed May 16, 2024
1 parent bff1848 commit ee996a6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ void SetImage(ImageCell cell, CellTableViewCell target)

source.LoadImage(cell.FindMauiContext(), (result) =>
{
var uiimage = result.Value;
if (uiimage != null)
var uiimage = result?.Value;
if (uiimage is not null)
{
NSRunLoop.Main.BeginInvokeOnMainThread(() =>
{
if (target.Cell != null)
if (target.Cell is not null)
{
target.ImageView.Image = uiimage;
target.SetNeedsLayout();
Expand Down

0 comments on commit ee996a6

Please sign in to comment.