No longer report JsonParseException

This commit is contained in:
huanghongxun
2019-09-05 19:06:09 +08:00
parent df39be708f
commit 2f9955febd
4 changed files with 20 additions and 4 deletions

View File

@@ -121,6 +121,9 @@ public final class TexturesLoader {
try (InputStream in = Files.newInputStream(file)) {
img = ImageIO.read(in);
}
if (img == null)
throw new IOException("Texture is malformed");
Map<String, String> metadata = texture.getMetadata();
if (metadata == null) {
metadata = emptyMap();