X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;ds=inline;f=supported%2FBasicSupport_Deprecated.java;h=40ff3fc027c7e52beca3426017e1a6a58972fbbe;hb=002972e9de731678035d56304d75a6d9e8233635;hp=a50ee3cf48a962a38b5ebe52b33184c956169ffd;hpb=6d465e886ae46c9da99117cc4302948f700a51c4;p=fanfix.git diff --git a/supported/BasicSupport_Deprecated.java b/supported/BasicSupport_Deprecated.java index a50ee3c..40ff3fc 100644 --- a/supported/BasicSupport_Deprecated.java +++ b/supported/BasicSupport_Deprecated.java @@ -651,7 +651,13 @@ public abstract class BasicSupport_Deprecated extends BasicSupport { InputStream in = null; try { in = Instance.getInstance().getCache().open(url, getSupport(url), 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) {