aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-07-23 14:02:25 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-07-23 14:02:25 +0200
commitc32162c2808a9bdef841cae706a8de9bcf5391a1 (patch)
tree3fc29f0e3436631c822ab3f7fdf2ae19e2846990 /src/main/java/eu/siacs
parentcd204d5931a6cf0289d2df120f278864b8b94fdf (diff)
switch/case can't deal with null pointers
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
index 7b36fc497..398102e12 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
@@ -39,6 +39,9 @@ public class IqPacket extends AbstractStanza {
public TYPE getType() {
final String type = getAttribute("type");
+ if (type == null) {
+ return TYPE.INVALID;
+ }
switch (type) {
case "error":
return TYPE.ERROR;