MFMailComposeViewController crashing while dismissModalViewControllerAnimated in iOS5
===

I am using MFMailComposeViewController in my conde to provide Mail functionality but after sending mail or when i want to cancel mail it will be crashing.

below is my code:  

> - (IBAction)FnForPlutoSupportEmailButtonPressed:(id)sender {
>     {
>         if ([MFMailComposeViewController canSendMail])
>         {
>             MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
>             
>             mailer.mailComposeDelegate = self;
>             
>             [mailer setSubject:@"Need help from Pluto support team"];
>             
>             NSArray *toRecipients = [NSArray arrayWithObjects:@"support@myplu.to",nil];
>             [mailer setToRecipients:toRecipients];
>             
>             
>             NSString *emailBody = @"";
>             
>             [mailer setMessageBody:emailBody isHTML:NO];
>             
>             //mailer.modalPresentationStyle = UIModalPresentationPageSheet;
> 
>             [self presentModalViewController:mailer animated:YES];
>             
>         }
>         else
>         {
>             UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failure"
>                                                             message:@"Your device doesn't support the composer sheet"
>                                                            delegate:nil
>                                                   cancelButtonTitle:@"OK"
>                                                   otherButtonTitles: nil];
>             [alert show];
>         }
>     } }
> 
> - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
> { 	// Notifies users about errors associated with the interface
> 	switch (result) 	{ 		case MFMailComposeResultCancelled:
>              			break;
>              		case MFMailComposeResultSaved:
>              			break;
>              		case MFMailComposeResultSent:
>              			break;
>              		case MFMailComposeResultFailed:
>              			break;
>              		default:
>              			break; 	} 	**[self dismissModalViewControllerAnimated:YE**S];
>      }



I have read all blog post but no solution is found, [This][1] blog post is having good explaination about this but as per this i am not presenting my view controller in viewdidload or viewdidappear.


  [1]: http://tinymission.com/blog/blogengine.web/post/2011/10/27/iOS5-Upgrade-Nightmares.aspx