mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 12:08:34 +00:00
Fix potential crash during contact splits.
This commit is contained in:
@@ -2248,7 +2248,10 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
|||||||
*/
|
*/
|
||||||
fun splitForStorageSync(storageId: ByteArray) {
|
fun splitForStorageSync(storageId: ByteArray) {
|
||||||
val record = getByStorageId(storageId)!!
|
val record = getByStorageId(storageId)!!
|
||||||
check(record.aci != null && record.pni != null)
|
if (record.aci == null || record.pni == null) {
|
||||||
|
Log.w(TAG, "Invalid state for split, ignoring.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
writableDatabase
|
writableDatabase
|
||||||
.update(TABLE_NAME)
|
.update(TABLE_NAME)
|
||||||
|
|||||||
Reference in New Issue
Block a user