git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'subtree'
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
BasicSupportHelper.java
diff --git
a/src/be/nikiroo/fanfix/supported/BasicSupportHelper.java
b/src/be/nikiroo/fanfix/supported/BasicSupportHelper.java
index 7768052cafc758094e38c1968f5919f6b853b8bc..f3c30bc9657dfe1a70555d8104cd591ad3bf1523 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/BasicSupportHelper.java
+++ b/
src/be/nikiroo/fanfix/supported/BasicSupportHelper.java
@@
-85,7
+85,13
@@
public class BasicSupportHelper {
InputStream in = null;
try {
in = Instance.getInstance().getCache().open(url, support, true);
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) {
} catch (IOException e) {
} finally {
if (in != null) {