Pushing view to second Navigation Controller
<p>I have have a tabbar application which has two items. Those two different tabbar items contains 2 different navigation controllers. 
First Navigation Controller works fine but when i want to push a view to second navigation it generates 
"Application tried to push a nil view controller on target".</p>

<p>here is the code for where i pushing a view to second navigation controller.</p>

<pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

TabNavAppDelegate *appDelegate = (TabNavAppDelegate *)[[UIApplication sharedApplication] delegate];
JJ_MapAnnotation *anno = (JJ_MapAnnotation *) [depotsArray objectAtIndex:indexPath.row];
if(self.secondViewController ==nil)
{
    SecondViewController *secView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
    self.secondViewController == secView;
    [self.secondViewController.map addAnnotation:anno];
    [secView release];
}


secondViewController.title = [NSString stringWithFormat:@"%@", [anno title]];

[appDelegate.navController pushViewController:secondViewController animated:YES]; 
</code></pre>
