Bug 998532 - Fix a crash in nsEditor::DetermineCurrentDirection(); r=roc