mirror of
https://github.com/4sval/FModel.git
synced 2026-09-13 03:56:43 -05:00
ui nullref fix
This commit is contained in:
Submodule CUE4Parse updated: d9c3db3765...00663461bc
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user