mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
fixed possible npe
This commit is contained in:
parent
a5d54d70ee
commit
8133dcd881
@ -330,6 +330,9 @@ public class XmppConnection implements Runnable {
|
|||||||
}
|
}
|
||||||
element.setAttributes(currentTag.getAttributes());
|
element.setAttributes(currentTag.getAttributes());
|
||||||
Tag nextTag = tagReader.readTag();
|
Tag nextTag = tagReader.readTag();
|
||||||
|
if (nextTag==null) {
|
||||||
|
throw new IOException("interrupted mid tag");
|
||||||
|
}
|
||||||
while (!nextTag.isEnd(element.getName())) {
|
while (!nextTag.isEnd(element.getName())) {
|
||||||
if (!nextTag.isNo()) {
|
if (!nextTag.isNo()) {
|
||||||
Element child = tagReader.readElement(nextTag);
|
Element child = tagReader.readElement(nextTag);
|
||||||
@ -341,6 +344,9 @@ public class XmppConnection implements Runnable {
|
|||||||
element.addChild(child);
|
element.addChild(child);
|
||||||
}
|
}
|
||||||
nextTag = tagReader.readTag();
|
nextTag = tagReader.readTag();
|
||||||
|
if (nextTag==null) {
|
||||||
|
throw new IOException("interrupted mid tag");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
++stanzasReceived;
|
++stanzasReceived;
|
||||||
lastPaketReceived = SystemClock.elapsedRealtime();
|
lastPaketReceived = SystemClock.elapsedRealtime();
|
||||||
|
Loading…
Reference in New Issue
Block a user