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
Merge branch 'subtree'
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
MangaLel.java
diff --git
a/src/be/nikiroo/fanfix/supported/MangaLel.java
b/src/be/nikiroo/fanfix/supported/MangaLel.java
index de0b871331ef313b6be628c382c9487f281b5c3e..5910a371aedf7272e546ec7170b508516879ced1 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/MangaLel.java
+++ b/
src/be/nikiroo/fanfix/supported/MangaLel.java
@@
-138,11
+138,17
@@
class MangaLel extends BasicSupport {
if (img != null) {
String coverUrl = img.absUrl("src");
if (img != null) {
String coverUrl = img.absUrl("src");
- InputStream coverIn;
try {
try {
- coverIn = Instance.getInstance().getCache().open(new URL(coverUrl), this, true);
+ InputStream coverIn = Instance.getInstance().getCache()
+ .open(new URL(coverUrl), this, true);
try {
try {
- return new Image(coverIn);
+ Image ii = new Image(coverIn);
+ if (ii.getSize() == 0) {
+ ii.close();
+ throw new IOException("Empty image not accepted");
+ }
+
+ return ii;
} finally {
coverIn.close();
}
} finally {
coverIn.close();
}