X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=supported%2FBasicSupportHelper.java;h=f3c30bc9657dfe1a70555d8104cd591ad3bf1523;hb=002972e9de731678035d56304d75a6d9e8233635;hp=7768052cafc758094e38c1968f5919f6b853b8bc;hpb=bff19b54d345ceb9e14aef616b53c013e93a0417;p=nikiroo-utils.git diff --git a/supported/BasicSupportHelper.java b/supported/BasicSupportHelper.java index 7768052..f3c30bc 100644 --- a/supported/BasicSupportHelper.java +++ b/supported/BasicSupportHelper.java @@ -85,7 +85,13 @@ public class BasicSupportHelper { 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) {