title: “Application tried to present modally an active controller” Error in iOS5
body: <p>I have an error which is causing my app to crash under iOS5 only on the iPad.</p>
  
  <p>The below code is called when the user taps on an item in a uibarbutton item :</p>
  
  <pre><code>- (void)optionSelected:(NSString *)option {
  
  [self.optionPickerPopover dismissPopoverAnimated:YES];
  
  if ([option compare:@"Map View"] == NSOrderedSame) {
      NSLog(@"Map View"); 
      MapView * map = [[MapView alloc] initWithNibName:@"MapView" bundle:nil]; 
  
      UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:map];
  
      UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
                                                                      style:UIBarButtonItemStyleDone target:self action:@selector(removeCurrent)];
      map.navigationItem.rightBarButtonItem = rightButton;
  
      [self presentModalViewController:navigationController animated:YES];
  
      [navigationController release];
      [map release];     
      [rightButton release];
      [split presentModalViewController:map animated:YES];
  }
  </code></pre>
  
  <p>Can anyone suggest why this occurring in iOS5 ?</p>