diff --git a/lib/encryption/utils/bootstrap.dart b/lib/encryption/utils/bootstrap.dart index 2ffa4b6c..63e912ad 100644 --- a/lib/encryption/utils/bootstrap.dart +++ b/lib/encryption/utils/bootstrap.dart @@ -484,8 +484,10 @@ class Bootstrap { for (final entry in secretsToStore.entries) { futures.add( client.onSync.stream - .firstWhere((syncUpdate) => syncUpdate.accountData - .any((accountData) => accountData.type == entry.key)) + .firstWhere((syncUpdate) => + syncUpdate.accountData != null && + syncUpdate.accountData + .any((accountData) => accountData.type == entry.key)) .then((_) => Logs().v('New Key with type ${entry.key} was created')), );