From 6028bf4ee246eab124ff52f410aa24938082bb8c Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Tue, 1 Jul 2014 14:53:39 +0200 Subject: fixed npe on rare occasion of show element in presence being null --- src/eu/siacs/conversations/entities/Presences.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/eu/siacs') diff --git a/src/eu/siacs/conversations/entities/Presences.java b/src/eu/siacs/conversations/entities/Presences.java index 77891648..acd80735 100644 --- a/src/eu/siacs/conversations/entities/Presences.java +++ b/src/eu/siacs/conversations/entities/Presences.java @@ -44,7 +44,7 @@ public class Presences { } public static int parseShow(Element show) { - if (show == null) { + if ((show == null)||(show.getContent() == null)) { return Presences.ONLINE; } else if (show.getContent().equals("away")) { return Presences.AWAY; -- cgit v1.2.3