]> nmode's Git Repositories - signal-cli/commitdiff
Don't save if username is null
authorAsamK <asamk@gmx.de>
Sat, 16 Apr 2016 13:07:49 +0000 (15:07 +0200)
committerAsamK <asamk@gmx.de>
Sat, 16 Apr 2016 13:07:49 +0000 (15:07 +0200)
src/main/java/org/asamk/signal/Manager.java

index 3931f3e31928ac5d6513b9e9c0372ed370c0607e..be94f7f5ae6d20b61babdd893561d47bcaf3ade6 100644 (file)
@@ -180,6 +180,9 @@ class Manager implements Signal {
     }
 
     private void save() {
     }
 
     private void save() {
+        if (username == null) {
+            return;
+        }
         ObjectNode rootNode = jsonProcessot.createObjectNode();
         rootNode.put("username", username)
                 .put("deviceId", deviceId)
         ObjectNode rootNode = jsonProcessot.createObjectNode();
         rootNode.put("username", username)
                 .put("deviceId", deviceId)