mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Fix crash when applying unknown fields.
This commit is contained in:
@@ -52,8 +52,16 @@ public class ApplyUnknownFieldsToSelfMigrationJob extends MigrationJob {
|
||||
return;
|
||||
}
|
||||
|
||||
Recipient self = Recipient.self();
|
||||
RecipientDatabase.RecipientSettings settings = DatabaseFactory.getRecipientDatabase(context).getRecipientSettingsForSync(self.getId());
|
||||
Recipient self;
|
||||
RecipientDatabase.RecipientSettings settings;
|
||||
|
||||
try {
|
||||
self = Recipient.self();
|
||||
settings = DatabaseFactory.getRecipientDatabase(context).getRecipientSettingsForSync(self.getId());
|
||||
} catch (RecipientDatabase.MissingRecipientException e) {
|
||||
Log.w(TAG, "Unable to find self");
|
||||
return;
|
||||
}
|
||||
|
||||
if (settings == null || settings.getSyncExtras().getStorageProto() == null) {
|
||||
Log.d(TAG, "No unknowns to apply");
|
||||
|
||||
Reference in New Issue
Block a user