Fix potential crash that could happen when legacy thread.id is null or empty

This commit is contained in:
AsamK committed 2020-03-27 15:33:27 +01:00
1 parent 286070c054
commit 416f43b225
1 file changed
+3
@@ -203,6 +203,9 @@ public class SignalAccount {
LegacyJsonThreadStore threadStore = jsonProcessor.convertValue(threadStoreNode, LegacyJsonThreadStore.class);
// Migrate thread info to group and contact store
for (ThreadInfo thread : threadStore.getThreads()) {
if (thread.id == null || thread.id.isEmpty()) {
continue;
}
try {
ContactInfo contactInfo = contactStore.getContact(new SignalServiceAddress(null, thread.id));
if (contactInfo != null) {