diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index 9e72eae5fe4..525617740cb 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -175,7 +175,8 @@ nsIsIndexFrame::GetInputFrame(nsIPresContext* aPresContext, { nsCOMPtr presShell; aPresContext->GetShell(getter_AddRefs(presShell)); - if (presShell) { + if (!mInputContent) NS_WARNING("null content - cannot restore state"); + if (presShell && mInputContent) { nsIFrame *frame; presShell->GetPrimaryFrameFor(mInputContent, &frame); if (frame) { diff --git a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp index 9e72eae5fe4..525617740cb 100644 --- a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp +++ b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp @@ -175,7 +175,8 @@ nsIsIndexFrame::GetInputFrame(nsIPresContext* aPresContext, { nsCOMPtr presShell; aPresContext->GetShell(getter_AddRefs(presShell)); - if (presShell) { + if (!mInputContent) NS_WARNING("null content - cannot restore state"); + if (presShell && mInputContent) { nsIFrame *frame; presShell->GetPrimaryFrameFor(mInputContent, &frame); if (frame) {