186752 - Need one more null check, this time before CallQueryInterface. r+sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@135660 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
caillon%returnzero.com 2002-12-28 00:03:33 +00:00
parent 2ce655c9b5
commit 6fa69e00be
2 changed files with 12 additions and 8 deletions

View File

@ -2899,11 +2899,13 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
nsRect viewportArea;
// get the nsIScrollableFrame interface from the scrollFrame
nsIFrame* scrollFrame = GetNearestScrollFrame(aForFrame);
nsIScrollableFrame* scrollableFrame;
CallQueryInterface(scrollFrame, &scrollableFrame);
if (scrollableFrame) {
scrollableFrame->GetScrolledFrame(aPresContext, scrolledFrame);
nsIFrame* scrollFrame = GetNearestScrollFrame(aForFrame);
if (scrollFrame) {
CallQueryInterface(scrollFrame, &scrollableFrame);
if (scrollableFrame) {
scrollableFrame->GetScrolledFrame(aPresContext, scrolledFrame);
}
}
if (scrolledFrame) {

View File

@ -2899,11 +2899,13 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
nsRect viewportArea;
// get the nsIScrollableFrame interface from the scrollFrame
nsIFrame* scrollFrame = GetNearestScrollFrame(aForFrame);
nsIScrollableFrame* scrollableFrame;
CallQueryInterface(scrollFrame, &scrollableFrame);
if (scrollableFrame) {
scrollableFrame->GetScrolledFrame(aPresContext, scrolledFrame);
nsIFrame* scrollFrame = GetNearestScrollFrame(aForFrame);
if (scrollFrame) {
CallQueryInterface(scrollFrame, &scrollableFrame);
if (scrollableFrame) {
scrollableFrame->GetScrolledFrame(aPresContext, scrolledFrame);
}
}
if (scrolledFrame) {