Fix possible crash for unregistered users.

This commit is contained in:
Greyson Parrelli
2021-12-22 13:01:54 -05:00
parent fefbf595cd
commit 2bbceaabd3

View File

@@ -201,7 +201,7 @@ public final class LiveRecipientCache {
stopwatch.split("thread");
if (SignalStore.registrationValues().isRegistrationComplete()) {
if (SignalStore.registrationValues().isRegistrationComplete() && SignalStore.account().getAci() != null) {
try (Cursor cursor = SignalDatabase.recipients().getNonGroupContacts(false)) {
int count = 0;
while (cursor != null && cursor.moveToNext() && count < CONTACT_CACHE_WARM_MAX) {