Bug 857334 - Fix crash in mozilla::a11y::XULTextFieldAccessible::FrameSelection

Bug 857334 - Fix crash in mozilla::a11y::XULTextFieldAccessible::FrameSelection, r=tbsaunde
This commit is contained in:
Birunthan Mohanathas 2013-06-22 00:29:00 +02:00
parent 619ee71fa7
commit c69d624cdb

View File

@ -830,6 +830,10 @@ already_AddRefed<nsFrameSelection>
XULTextFieldAccessible::FrameSelection()
{
nsCOMPtr<nsIContent> inputContent(GetInputField());
NS_ASSERTION(inputContent, "No input content");
if (!inputContent)
return nullptr;
nsIFrame* frame = inputContent->GetPrimaryFrame();
return frame ? frame->GetFrameSelection() : nullptr;
}