aboutsummaryrefslogtreecommitdiffstats
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
parentcd204d5931a6cf0289d2df120f278864b8b94fdf (diff)
switch/case can't deal with null pointers
-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 7b36fc49..398102e1 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;