From f8f2afb491636143469bc978ba7687a1428513ba Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 22 Jun 2018 05:18:07 +0000 Subject: [PATCH] Fix ServerBridge trace NPE --- src/be/nikiroo/utils/serial/server/ServerBridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/be/nikiroo/utils/serial/server/ServerBridge.java b/src/be/nikiroo/utils/serial/server/ServerBridge.java index 157b27ee..ea9fd1b3 100644 --- a/src/be/nikiroo/utils/serial/server/ServerBridge.java +++ b/src/be/nikiroo/utils/serial/server/ServerBridge.java @@ -220,7 +220,7 @@ public class ServerBridge extends Server { * the data to trace */ private void trace(String prefix, String data) { - int size = data.length(); + int size = data == null ? 0 : data.length(); String ssize = size + " byte"; if (size > 1) { ssize = size + " bytes"; -- 2.27.0