From c6d375937335a984e8ad899239de4eea6a737374 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 12 Sep 2020 15:53:11 -0700 Subject: [PATCH] test to avoid NPE --- .../main/java/org/eehouse/android/xw4/ConnStatusHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java index 487dbd2e6..ea5f3e3f7 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java @@ -722,7 +722,9 @@ public class ConnStatusHandler { fcmMsg ); break; case COMMS_CONN_MQTT: - result = String.format("DevID: %s", addr.mqtt_devID ); + if ( null != addr ) { + result = String.format("DevID: %s", addr.mqtt_devID ); + } break; case COMMS_CONN_P2P: result = WiDirService.formatNetStateInfo();