From bdfa0d2b2a6b1fce24de5cd893b01cda57edd91d Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Tue, 16 Dec 2014 21:17:34 +0000 Subject: [PATCH] Bugfix: NullPointerException --- src/com/sheepit/client/Utils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/sheepit/client/Utils.java b/src/com/sheepit/client/Utils.java index 2473eeb..97d005a 100644 --- a/src/com/sheepit/client/Utils.java +++ b/src/com/sheepit/client/Utils.java @@ -171,6 +171,9 @@ public class Utils { } public static ServerCode statusIsOK(Document document_, String rootname_) { + if (document_ == null) { + return Error.ServerCode.UNKNOWN; + } NodeList ns = document_.getElementsByTagName(rootname_); if (ns.getLength() == 0) { return Error.ServerCode.ERROR_NO_ROOT;