git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not allow empty cover images
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
BasicSupport_Deprecated.java
diff --git
a/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
b/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
index a50ee3cf48a962a38b5ebe52b33184c956169ffd..40ff3fc027c7e52beca3426017e1a6a58972fbbe 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
+++ b/
src/be/nikiroo/fanfix/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);
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) {
} catch (IOException e) {
} finally {
if (in != null) {