Catch the case where the content node for the Input has not been created yet, prevent crash. b=123914 r=jkeiser, sr=roc+moz, a=asa (OBO drivers)

This commit is contained in:
attinasi%netscape.com 2002-03-15 00:40:07 +00:00
parent d5635c170d
commit edae7e78f2
2 changed files with 4 additions and 2 deletions

View File

@ -175,7 +175,8 @@ nsIsIndexFrame::GetInputFrame(nsIPresContext* aPresContext,
{
nsCOMPtr<nsIPresShell> 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) {

View File

@ -175,7 +175,8 @@ nsIsIndexFrame::GetInputFrame(nsIPresContext* aPresContext,
{
nsCOMPtr<nsIPresShell> 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) {