File tree Expand file tree Collapse file tree
core/src/com/etheller/warsmash/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,19 +31,16 @@ public final class ImageUtils {
3131 public static final String DEFAULT_ICON_PATH = "ReplaceableTextures\\ CommandButtons\\ BTNTemp.blp" ;
3232
3333 public static Texture getAnyExtensionTexture (final DataSource dataSource , final String path ) {
34- if (dataSource .has (path )) {
35- BufferedImage image ;
36- try {
37- final AnyExtensionImage imageInfo = getAnyExtensionImageFixRGB (dataSource , path , "texture" );
38- image = imageInfo .getImageData ();
39- if (image != null ) {
40- return ImageUtils .getTexture (image , imageInfo .isNeedsSRGBFix ());
41- }
42- } catch (final IOException e ) {
43- return null ;
34+ BufferedImage image ;
35+ try {
36+ final AnyExtensionImage imageInfo = getAnyExtensionImageFixRGB (dataSource , path , "texture" );
37+ image = imageInfo .getImageData ();
38+ if (image != null ) {
39+ return ImageUtils .getTexture (image , imageInfo .isNeedsSRGBFix ());
4440 }
45- } else {
46- System .err .println ("Missing texture " + path );
41+ } catch (final IOException e ) {
42+ System .err .println ("Failed to load texture image " + path + ": " + e .getMessage ());
43+ return null ;
4744 }
4845 return null ;
4946 }
You can’t perform that action at this time.
0 commit comments