From b07fa8c481a9d4ff3383b247d92587bc9df483a2 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sat, 7 Aug 1999 20:43:47 +0000 Subject: [PATCH] fixes a crasher triggered by test case of bug #5194. --- layout/base/nsPresShell.cpp | 2 +- layout/html/base/src/nsPresShell.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index ff93e730d010..cdc0c31c3496 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1366,7 +1366,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame, // XXX Deal with the case where there is a scrolled element, e.g., a // DIV in the middle... - while (closestView != scrolledView) { + while ((closestView != nsnull) && (closestView != scrolledView)) { nscoord x, y; // Update the offset diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp index ff93e730d010..cdc0c31c3496 100644 --- a/layout/html/base/src/nsPresShell.cpp +++ b/layout/html/base/src/nsPresShell.cpp @@ -1366,7 +1366,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame, // XXX Deal with the case where there is a scrolled element, e.g., a // DIV in the middle... - while (closestView != scrolledView) { + while ((closestView != nsnull) && (closestView != scrolledView)) { nscoord x, y; // Update the offset