bulletproof to prevent crashing

(asserts will still go off)
This commit is contained in:
alecf%netscape.com 1999-09-11 19:11:53 +00:00
parent 87957ce0af
commit 528f914113
2 changed files with 4 additions and 2 deletions

View File

@ -487,6 +487,7 @@ PRBool nsCaret::SetupDrawingFrameAndOffset()
//-----------------------------------------------------------------------------
void nsCaret::GetViewForRendering(nsIFrame *caretFrame, EViewCoordinates coordType, nsPoint &viewOffset, nsIView* &outView)
{
if (!caretFrame) return;
outView = nsnull;
nsIView* theView = nsnull;
@ -586,7 +587,7 @@ void nsCaret::DrawCaret()
NS_ASSERTION(mLastCaretFrame != nsnull, "Should have a frame here");
nsPoint viewOffset(0, 0);
nsIView *drawingView;
nsIView *drawingView = nsnull;
GetViewForRendering(mLastCaretFrame, eViewCoordinates, viewOffset, drawingView);
if (drawingView)

View File

@ -487,6 +487,7 @@ PRBool nsCaret::SetupDrawingFrameAndOffset()
//-----------------------------------------------------------------------------
void nsCaret::GetViewForRendering(nsIFrame *caretFrame, EViewCoordinates coordType, nsPoint &viewOffset, nsIView* &outView)
{
if (!caretFrame) return;
outView = nsnull;
nsIView* theView = nsnull;
@ -586,7 +587,7 @@ void nsCaret::DrawCaret()
NS_ASSERTION(mLastCaretFrame != nsnull, "Should have a frame here");
nsPoint viewOffset(0, 0);
nsIView *drawingView;
nsIView *drawingView = nsnull;
GetViewForRendering(mLastCaretFrame, eViewCoordinates, viewOffset, drawingView);
if (drawingView)