mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-09-23 09:42:26 +00:00
Add exception check for empty texture
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user