title: Application tried to present a nil modal view controller on target <UINavigationController: 0x2007af00>
body: <p>I am getting the following error:</p>
  
  <pre><code>Application tried to present a nil modal view controller on target &lt;UINavigationController: 0x2007af00&gt;.
  </code></pre>
  
  <p>On the following code:</p>
  
  <pre><code>-(void) showAddressBookDialog
  {
      [self presentMailComposeViewController:nil];
  }
  
  
  - (void)presentMailComposeViewController:(NSString *)recipient {
      // Create the compose email view controller
      MFMailComposeViewController *composeEmailViewController = [[MFMailComposeViewController alloc] init];
      [composeEmailViewController setMailComposeDelegate:self];
      [composeEmailViewController setSubject:@"Join me on X"];
      [composeEmailViewController setToRecipients:[NSArray arrayWithObjects:recipient, nil]];
      [composeEmailViewController setMessageBody:@"" isHTML:YES];
      [composeEmailViewController setModalPresentationStyle:UIModalPresentationFormSheet];
      [self dismissModalViewControllerAnimated:NO];
      self.inviteFriendsMailComposerVC_ = composeEmailViewController;
      //[self.navigationController presentModalViewController:composeEmailViewController animated:YES];
      [self.navigationController presentViewController:composeEmailViewController animated:YES completion:nil];
      [composeEmailViewController release];
  }
  </code></pre>
  
  <p>Any idea why?</p>