|
@@ -284,6 +284,16 @@ namespace Avalonia.Media.Imaging
|
|
|
return AvaloniaLocator.Current.GetRequiredService<IPlatformRenderInterface>();
|
|
return AvaloniaLocator.Current.GetRequiredService<IPlatformRenderInterface>();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- IRef<IBitmapImpl> IImageBrushSource.Bitmap => PlatformImpl;
|
|
|
|
|
|
|
+ IRef<IBitmapImpl>? IImageBrushSource.Bitmap
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ // TODO12: We should probably make PlatformImpl to be nullable or make it possible to check
|
|
|
|
|
+ // and fix IRef<T> in general (right now Item is not nullable while it internally is)
|
|
|
|
|
+ if (PlatformImpl.Item == null!)
|
|
|
|
|
+ return null;
|
|
|
|
|
+ return PlatformImpl;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|