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 */
|
/* Load image */
|
||||||
if(is != null) {
|
if(is != null) {
|
||||||
ImageIO.setUseCache(false);
|
ImageIO.setUseCache(false);
|
||||||
img = ImageIO.read(is);
|
try {
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
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) {
|
if(idx >= imgs.length) {
|
||||||
LoadedImage[] newimgs = new LoadedImage[idx+1];
|
LoadedImage[] newimgs = new LoadedImage[idx+1];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue