update from master
[fanfix.git] / supported / BasicSupportImages.java
index 576cb17e78bb3abfe845a1b053df47618636e5c6..f56b50c2b67a6dd9f5a4b1e0de572767d0a42dde 100644 (file)
@@ -55,7 +55,13 @@ public class BasicSupportImages {
                        InputStream in = null;
                        try {
                                in = Instance.getInstance().getCache().open(url, support, true);
-                               return new Image(in);
+                               Image img = new Image(in);
+                               if (img.getSize() == 0) {
+                                       img.close();
+                                       throw new IOException(
+                                                       "Empty image not accepted");
+                               }
+                               return img;
                        } catch (IOException e) {
                        } finally {
                                if (in != null) {