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
old change from netbook
[nikiroo-utils.git]
/
Image.java
diff --git
a/Image.java
b/Image.java
index 4518577d640b684bee939381e02b9aa745b2d3a2..76d2b206882a11eac07e0ff44212cc37711fa22e 100644
(file)
--- a/
Image.java
+++ b/
Image.java
@@
-116,7
+116,13
@@
public class Image implements Closeable, Serializable {
* in case of I/O error
*/
public InputStream newInputStream() throws IOException {
* in case of I/O error
*/
public InputStream newInputStream() throws IOException {
- return new MarkableFileInputStream(data);
+ synchronized (instanceLock) {
+ if (data == null) {
+ throw new IOException("Image was close()d");
+ }
+
+ return new MarkableFileInputStream(data);
+ }
}
/**
}
/**