mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 15:51:37 +00:00
bulletproof to prevent crashing
(asserts will still go off)
This commit is contained in:
parent
87957ce0af
commit
528f914113
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user