Bug 863221 - Crash in nsBaseWidget::NotifyUIStateChanged when GetPresShell returns NULL. r=roc