diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index 6600f9e5355..f402badd2cd 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -554,8 +554,9 @@ nsFileControlFrame::GetFormProperty(nsIAtom* aName, nsAString& aValue) const "If we have a cached state, we better have no mTextFrame"); if (mCachedState) { aValue.Assign(*mCachedState); - } else if (mTextContent) { - nsCOMPtr fileControl = do_QueryInterface(mTextContent); + } else { + nsCOMPtr fileControl = + do_QueryInterface(mContent); if (fileControl) { fileControl->GetFileName(aValue); }