diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index dc30f1103f9..484625a85a1 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -6998,11 +6998,12 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl, // don't check menulists as the selected item will be inside a popup. nsCOMPtr menulist = do_QueryInterface(aCurrentEl); if (!menulist) { - checkLineHeight = PR_FALSE; nsCOMPtr select = do_QueryInterface(aCurrentEl); - if (select) + if (select) { + checkLineHeight = PR_FALSE; select->GetSelectedItem(getter_AddRefs(item)); + } } }