From 16f4e56c75ac67e831ae7129b7a71984cda62732 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Sat, 4 Mar 2000 12:00:35 +0000 Subject: [PATCH] Fix for 30369. r=ben --- layout/xul/base/src/nsTreeRowGroupFrame.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layout/xul/base/src/nsTreeRowGroupFrame.cpp b/layout/xul/base/src/nsTreeRowGroupFrame.cpp index b852125e78a3..da0d61b8810e 100644 --- a/layout/xul/base/src/nsTreeRowGroupFrame.cpp +++ b/layout/xul/base/src/nsTreeRowGroupFrame.cpp @@ -1843,6 +1843,10 @@ nsTreeRowGroupFrame::GetCellFrameAtIndex(PRInt32 aRowIndex, PRInt32 aColIndex, #ifdef DEBUG_tree printf("Looking for cell (%d, %d)..", aRowIndex, aColIndex); #endif + + // Init the result to null. + *aResult = nsnull; + // The screen index = (aRowIndex - mCurrentIndex) PRInt32 screenIndex = aRowIndex - mCurrentIndex; @@ -1858,7 +1862,7 @@ nsTreeRowGroupFrame::GetCellFrameAtIndex(PRInt32 aRowIndex, PRInt32 aColIndex, nsTableCellMap * cellMap = tableFrame->GetCellMap(); CellData* cellData = cellMap->GetCellAt(screenIndex, aColIndex); - if (cellData->IsOrig()) { // the cell originates at (rowX, colX) + if (cellData && cellData->IsOrig()) { // the cell originates at (rowX, colX) cellFrame = cellData->GetCellFrame(); if (cellFrame) { *aResult = (nsTreeCellFrame*)cellFrame; // XXX I am evil.