From fb5466f5e4a48d197b54a42f4f75edde5d0b4eed Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Thu, 21 Oct 1999 00:11:55 +0000 Subject: [PATCH] bug 14915 - fix crash. git-svn-id: svn://10.0.0.236/trunk@51328 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsTableFrame.cpp | 8 ++++++-- mozilla/layout/tables/nsTableFrame.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index b573a8f56d1..e713d000e7b 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1384,7 +1384,9 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext, { nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges->mEdges[NS_SIDE_RIGHT].ElementAt(aRowIndex)); *tableBorder = border; - tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + if (cellFrame) { + tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + } mBorderEdges->mMaxBorderWidth.right = PR_MAX(border.mWidth, mBorderEdges->mMaxBorderWidth.right); // since the table is our right neightbor, we need to factor in the table's horizontal borders. // can't compute that length here because we don't know how thick top and bottom borders are @@ -1603,7 +1605,9 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext, { nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges->mEdges[NS_SIDE_BOTTOM].ElementAt(aColIndex)); *tableBorder = border; - tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + if (cellFrame) { + tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + } mBorderEdges->mMaxBorderWidth.bottom = PR_MAX(border.mWidth, mBorderEdges->mMaxBorderWidth.bottom); // since the table is our bottom neightbor, we need to factor in the table's vertical borders. PRInt32 lastColIndex = mCellMap->GetColCount()-1; diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index b573a8f56d1..e713d000e7b 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1384,7 +1384,9 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext, { nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges->mEdges[NS_SIDE_RIGHT].ElementAt(aRowIndex)); *tableBorder = border; - tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + if (cellFrame) { + tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + } mBorderEdges->mMaxBorderWidth.right = PR_MAX(border.mWidth, mBorderEdges->mMaxBorderWidth.right); // since the table is our right neightbor, we need to factor in the table's horizontal borders. // can't compute that length here because we don't know how thick top and bottom borders are @@ -1603,7 +1605,9 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext, { nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges->mEdges[NS_SIDE_BOTTOM].ElementAt(aColIndex)); *tableBorder = border; - tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + if (cellFrame) { + tableBorder->mInsideNeighbor = cellFrame->mBorderEdges; + } mBorderEdges->mMaxBorderWidth.bottom = PR_MAX(border.mWidth, mBorderEdges->mMaxBorderWidth.bottom); // since the table is our bottom neightbor, we need to factor in the table's vertical borders. PRInt32 lastColIndex = mCellMap->GetColCount()-1;