aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xml/XmlReader.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xml/XmlReader.java')
-rw-r--r--src/eu/siacs/conversations/xml/XmlReader.java9
1 files changed, 6 insertions, 3 deletions
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()) {