Fix crash when scrolling absolute positioned textarea by adding test to return value from |GetLine|. Bug 105004, r=rbs, sr=kin

This commit is contained in:
smontagu%netscape.com 2001-11-16 03:08:30 +00:00
parent 7b4f0f2669
commit 4a54e891e9
2 changed files with 4 additions and 0 deletions

View File

@ -3737,6 +3737,8 @@ nsFrame::GetFrameFromDirection(nsIPresContext* aPresContext, nsPeekOffsetStruct
&lineFlags);
if (NS_FAILED(result))
return result;
if (!firstFrame)
return NS_ERROR_FAILURE;
lastFrame = firstFrame;
for (;lineFrameCount > 1;lineFrameCount --){

View File

@ -3737,6 +3737,8 @@ nsFrame::GetFrameFromDirection(nsIPresContext* aPresContext, nsPeekOffsetStruct
&lineFlags);
if (NS_FAILED(result))
return result;
if (!firstFrame)
return NS_ERROR_FAILURE;
lastFrame = firstFrame;
for (;lineFrameCount > 1;lineFrameCount --){