]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/manager/Manager.java
Fix NPE when receiving contacts sync message
[signal-cli] / src / main / java / org / asamk / signal / manager / Manager.java
index 44ec6445f8f852aa1d50a9c7bad64724ff576f4f..e358fcb943913d029ed4aa844e67c677441e1b5d 100644 (file)
@@ -1149,6 +1149,10 @@ public class Manager implements Signal {
                                 }
                                 if (c.getExpirationTimer().isPresent()) {
                                     ThreadInfo thread = account.getThreadStore().getThread(c.getNumber());
+                                    if (thread == null) {
+                                        thread = new ThreadInfo();
+                                        thread.id = c.getNumber();
+                                    }
                                     thread.messageExpirationTime = c.getExpirationTimer().get();
                                     account.getThreadStore().updateThread(thread);
                                 }