ソースを参照

Added fallback to stupid ImageIcon method.

No reason this should work if everything else failed, but what do I know
Ludwig Tietze 7 年 前
コミット
2fbae2cfb9
1 ファイル変更3 行追加1 行削除
  1. 3 1
      src/ui/view/Util.java

+ 3 - 1
src/ui/view/Util.java

@@ -5,6 +5,7 @@ import java.io.File;
 import java.io.IOException;
 
 import javax.imageio.ImageIO;
+import javax.swing.ImageIcon;
 
 public class Util {
 	
@@ -25,8 +26,9 @@ public class Util {
 			return ImageIO.read(f);
 		} catch (IOException e) {
 			e.printStackTrace();
+			return new ImageIcon(url).getImage();//TODO: There is no reason this should work if everything else failed.
 		}
-		return null;
+		//return null;
 	}
 	static File loadFile(Object origin, String url){
 		String forcedSeparator="/";