Skip to content

Commit

Permalink
Fix send mail crash when not email account
Browse files Browse the repository at this point in the history
  • Loading branch information
yourtion committed Feb 4, 2015
1 parent ed294f1 commit 44ead07
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion SuperLogger/SuperLogerListView.m
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger
[picker setMessageBody:logger.mailContect isHTML:NO];
[picker setMailComposeDelegate:self];
dispatch_async(dispatch_get_main_queue(), ^(void){
[self presentViewController:picker animated:YES completion:nil];
@try {
[self presentViewController:picker animated:YES completion:nil];
}
@catch (NSException * e)
{ NSLog(@"Exception: %@", e); }
});
}
}];
Expand Down
6 changes: 5 additions & 1 deletion SuperLogger/SuperLoggerPreviewView.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ -(void)send
[picker setToRecipients:[NSArray array]];
[picker setMessageBody:logger.mailContect isHTML:NO];
[picker setMailComposeDelegate:self];
[self presentViewController:picker animated:YES completion:nil];
@try {
[self presentViewController:picker animated:YES completion:nil];
}
@catch (NSException * e)
{ NSLog(@"Exception: %@", e); }
}
}];
}
Expand Down

0 comments on commit 44ead07

Please sign in to comment.