aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xmpp
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-22 20:15:37 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-22 20:49:04 +0100
commit13222d1b6a326b8477f2b80bfe583e41b2e33686 (patch)
tree4e9111e3b21b6fa51db278033233d038843797a3 /src/main/java/de/pixart/messenger/xmpp
parent696a54b5f286679d7b77e47c1fedcff0f3c4e259 (diff)
npe checks
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 0e05a2775..4a93d1eb6 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -102,7 +102,7 @@ public class XmppConnection implements Runnable {
private final WakeLock wakeLock;
private Socket socket;
private XmlReader tagReader;
- private TagWriter tagWriter;
+ private TagWriter tagWriter = new TagWriter();
private final Features features = new Features(this);
private boolean needsBinding = true;
private boolean shouldAuthenticate = true;
@@ -480,7 +480,9 @@ public class XmppConnection implements Runnable {
}
this.socket = socket;
tagReader = new XmlReader(wakeLock);
- if (tagWriter != null) tagWriter.forceClose();
+ if (tagWriter != null) {
+ tagWriter.forceClose();
+ }
tagWriter = new TagWriter();
tagWriter.setOutputStream(socket.getOutputStream());
tagReader.setInputStream(socket.getInputStream());