Fixed bug in tabbed Application when rotate

crash if the popovercontroller is not visible and if you rotate you device when you are in another tab (Like in tabbed Application)