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)

git-svn-id: svn://10.0.0.236/trunk@116604 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
attinasi%netscape.com
2002-03-15 00:40:07 +00:00
parent a0453cc698
commit 90cd023a8d
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) {