Handle error loading texture pack image without aborting texture pack
load
This commit is contained in:
parent
30f690831d
commit
414c57bb0f
1 changed files with 7 additions and 2 deletions
|
|
@ -1254,8 +1254,13 @@ public class TexturePack {
|
|||
/* Load image */
|
||||
if(is != null) {
|
||||
ImageIO.setUseCache(false);
|
||||
img = ImageIO.read(is);
|
||||
if(img == null) { throw new FileNotFoundException(); }
|
||||
try {
|
||||
img = ImageIO.read(is);
|
||||
} catch (IOException iox) {
|
||||
}
|
||||
if (img == null) {
|
||||
Log.warning(String.format("Error loading image %s from module %s", fname, modid));
|
||||
}
|
||||
}
|
||||
if(idx >= imgs.length) {
|
||||
LoadedImage[] newimgs = new LoadedImage[idx+1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue