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
update from master
[fanfix.git]
/
supported
/
BasicSupportImages.java
diff --git
a/supported/BasicSupportImages.java
b/supported/BasicSupportImages.java
index 576cb17e78bb3abfe845a1b053df47618636e5c6..f56b50c2b67a6dd9f5a4b1e0de572767d0a42dde 100644
(file)
--- a/
supported/BasicSupportImages.java
+++ b/
supported/BasicSupportImages.java
@@
-55,7
+55,13
@@
public class BasicSupportImages {
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) {