From 66bb5c9b51d8da72e0799707ba95d83da4f419b5 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 25 Jun 2014 17:54:00 +0200 Subject: more npe fixes --- src/eu/siacs/conversations/xml/XmlReader.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/xml/XmlReader.java') diff --git a/src/eu/siacs/conversations/xml/XmlReader.java b/src/eu/siacs/conversations/xml/XmlReader.java index 4c418027..98bee3ee 100644 --- a/src/eu/siacs/conversations/xml/XmlReader.java +++ b/src/eu/siacs/conversations/xml/XmlReader.java @@ -89,12 +89,15 @@ public class XmlReader { Element element = new Element(currentTag.getName()); element.setAttributes(currentTag.getAttributes()); Tag nextTag = this.readTag(); + if (nextTag == null) { + throw new IOException("unterupted mid tag"); + } if(nextTag.isNo()) { element.setContent(nextTag.getName()); nextTag = this.readTag(); - } - if (nextTag == null) { - throw new IOException("unterupted mid tag"); + if (nextTag == null) { + throw new IOException("unterupted mid tag"); + } } while(!nextTag.isEnd(element.getName())) { if (!nextTag.isNo()) { -- cgit v1.2.3