Skip to content

Commit

Permalink
Fixed empty view when no mail account is registered.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Seiffert authored and ideashower committed Nov 15, 2010
1 parent 776785b commit 2c02aae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Classes/ShareKit/Sharers/Actions/Email/SHKMail.m
Expand Up @@ -121,6 +121,12 @@ - (void)shortenURLFinished:(SHKRequest *)aRequest {
- (BOOL)sendMail
{
MFMailComposeViewController *mailController = [[[MFMailComposeViewController alloc] init] autorelease];
if (!mailController) {
// e.g. no mail account registered (will show alert)
[[SHK currentHelper] hideCurrentViewControllerAnimated:YES];
return YES;
}

mailController.mailComposeDelegate = self;

NSString *body = [item customValueForKey:@"body"];
Expand Down

0 comments on commit 2c02aae

Please sign in to comment.