Fix crash

This commit is contained in:
nielsandriesse 2020-06-18 10:38:55 +10:00
parent 2e8663a1b0
commit 042535778b
1 changed files with 9 additions and 0 deletions

View File

@ -176,6 +176,15 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
#pragma mark - Local Profile
- (OWSUserProfile *)localUserProfile
{
__block OWSUserProfile *userProfile;
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
userProfile = [self getLocalUserProfileWithTransaction:transaction];
} error:nil];
return userProfile;
}
- (OWSUserProfile *)getLocalUserProfileWithTransaction:(YapDatabaseReadWriteTransaction *)transaction
{
@synchronized(self)