From 4e8e09e468213c9ffd466b7334e4960de962134d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 4 Jun 2013 22:01:51 +1200 Subject: Update GS decoder --- .../traccar/protocol/GlobalSatProtocolDecoder.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index f4aa94110..a2b115445 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -39,16 +39,16 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { super(serverManager); // Initialize format strings - Properties p = getServerManager().getProperties(); - if (p.contains("globalsat.format0")) { - format0 = p.getProperty("globalsat.format0"); - } else { - format0 = "TSPRXAB27GHKLMnaicz*U!"; - } - if (p.contains("globalsat.format1")) { - format1 = p.getProperty("globalsat.format1"); - } else { - format1 = "SARY*U!"; + format0 = "TSPRXAB27GHKLMnaicz*U!"; + format1 = "SARY*U!"; + if (getServerManager() != null) { + Properties p = getServerManager().getProperties(); + if (p.contains("globalsat.format0")) { + format0 = p.getProperty("globalsat.format0"); + } + if (p.contains("globalsat.format1")) { + format1 = p.getProperty("globalsat.format1"); + } } } -- cgit v1.2.3