mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 10:35:16 +01:00
Fix NullPointerException when trying to load textures from an empty textures.json file
This commit is contained in:
parent
cc01585e07
commit
310a2e55eb
@ -69,6 +69,7 @@ public static TextureGallery readTexturesFile(InputStream in) throws IOException
|
||||
TextureGallery gallery = new TextureGallery();
|
||||
try (Reader reader = new InputStreamReader(in)) {
|
||||
Texture[] textures = ResourcesGson.INSTANCE.fromJson(reader, Texture[].class);
|
||||
if (textures == null) throw new IOException("Texture data is empty!");
|
||||
gallery.nextId = textures.length;
|
||||
for (int ordinal = 0; ordinal < textures.length; ordinal++) {
|
||||
Texture texture = textures[ordinal];
|
||||
|
Loading…
Reference in New Issue
Block a user