aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGavriel Fleischer <flocsy@gmail.com>2019-11-11 00:26:01 +0200
committerGavriel Fleischer <flocsy@gmail.com>2019-11-11 00:26:01 +0200
commit61d07a123beeaa1e85f44046413a680aabda0c9c (patch)
tree491cfef82314c5cf22861b1004b73ec4ad7d0854 /src
parent8a696af4d92821ccf741c21dcbe118861008743a (diff)
downloadtraccar-server-61d07a123beeaa1e85f44046413a680aabda0c9c.tar.gz
traccar-server-61d07a123beeaa1e85f44046413a680aabda0c9c.tar.bz2
traccar-server-61d07a123beeaa1e85f44046413a680aabda0c9c.zip
fixed NPE for optional language parameter
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/StringProtocolEncoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/StringProtocolEncoder.java b/src/main/java/org/traccar/StringProtocolEncoder.java
index 40dfb25b6..e9fb65500 100644
--- a/src/main/java/org/traccar/StringProtocolEncoder.java
+++ b/src/main/java/org/traccar/StringProtocolEncoder.java
@@ -39,7 +39,7 @@ public abstract class StringProtocolEncoder extends BaseProtocolEncoder {
if (valueFormatter != null) {
value = valueFormatter.formatValue(keys[i], object);
}
- if (value == null) {
+ if (value == null && object != null) {
value = object.toString();
}
if (value == null) {