kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix crash when applying unknown fields.
rodzic
08e86b8c82
commit
3c522c677b
|
@ -52,8 +52,16 @@ public class ApplyUnknownFieldsToSelfMigrationJob extends MigrationJob {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Recipient self = Recipient.self();
|
Recipient self;
|
||||||
RecipientDatabase.RecipientSettings settings = DatabaseFactory.getRecipientDatabase(context).getRecipientSettingsForSync(self.getId());
|
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) {
|
if (settings == null || settings.getSyncExtras().getStorageProto() == null) {
|
||||||
Log.d(TAG, "No unknowns to apply");
|
Log.d(TAG, "No unknowns to apply");
|
||||||
|
|
Ładowanie…
Reference in New Issue