Add exception check for empty texture

This commit is contained in:
MayNL
2026-06-22 11:02:21 -04:00
parent 6237dbe36b
commit d3dc791a41
2 changed files with 9 additions and 6 deletions
@@ -45,6 +45,10 @@ namespace PckStudio.Core.Extensions
{
throw new Exception("Asset is not suitable to contain image data.");
}
if (asset.Size == 0)
{
throw new Exception("Asset is has no data.");
}
return asset.GetDeserializedData(ImageDeserializer.DefaultDeserializer);
}