From 510d8a2ae35ffe541ffd75b931e7d2e0e5e6b211 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 14 Aug 2014 09:59:41 +0200 Subject: another rare npe fixed --- src/eu/siacs/conversations/xmpp/XmppConnection.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/eu/siacs/conversations') diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index b1f580d8..d8c9f4b9 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -416,8 +416,14 @@ public class XmppConnection implements Runnable { NoSuchAlgorithmException { tagReader.readTag(); // read tag close + if (!tagWriter.isActive()) { + throw new IOException(); + } tagWriter.setOutputStream(new ZLibOutputStream(tagWriter .getOutputStream())); + if (tagReader.getInputStream() == null) { + throw new IOException(); + } tagReader .setInputStream(new ZLibInputStream(tagReader.getInputStream())); -- cgit v1.2.3