mirror of
https://github.com/4sval/FModel.git
synced 2026-04-25 07:21:54 -05:00
ui nullref fix
This commit is contained in:
parent
2fea609a63
commit
352386d1fa
|
|
@ -1 +1 @@
|
|||
Subproject commit d9c3db37652e615cf7160c168ccdb995171d1947
|
||||
Subproject commit 00663461bc32e1c0bac12448e2f5c65c78c57dd0
|
||||
|
|
@ -63,6 +63,12 @@ public class TabImage : ViewModel
|
|||
|
||||
private void SetImage(SKBitmap bitmap)
|
||||
{
|
||||
if (bitmap is null)
|
||||
{
|
||||
ImageBuffer = null;
|
||||
Image = null;
|
||||
return;
|
||||
}
|
||||
_bmp = bitmap;
|
||||
using var data = _bmp.Encode(NoAlpha ? SKEncodedImageFormat.Jpeg : SKEncodedImageFormat.Png, 100);
|
||||
using var stream = new MemoryStream(ImageBuffer = data.ToArray(), false);
|
||||
|
|
@ -451,4 +457,4 @@ public class TabControlViewModel : ViewModel
|
|||
{
|
||||
yield return new TabItem("New Tab", string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user