aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-13 10:23:26 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-13 10:23:26 +0200
commitad9b9b9096e05bfdb63615a8e896b001116e10f9 (patch)
tree597ac7bdd51d10f3151942b614718f6184910dfa /src
parentcce12af7663eb7649b98f9c74f577fb43ee9ee11 (diff)
fixed npe in tag writer
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/xml/TagWriter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/xml/TagWriter.java b/src/eu/siacs/conversations/xml/TagWriter.java
index 40d5b328..ef1e8555 100644
--- a/src/eu/siacs/conversations/xml/TagWriter.java
+++ b/src/eu/siacs/conversations/xml/TagWriter.java
@@ -23,8 +23,12 @@ public class TagWriter {
}
try {
AbstractStanza output = writeQueue.take();
- outputStream.write(output.toString());
- outputStream.flush();
+ if (outputStream==null) {
+ shouldStop = true;
+ } else {
+ outputStream.write(output.toString());
+ outputStream.flush();
+ }
} catch (IOException e) {
shouldStop = true;
} catch (InterruptedException e) {