Bug 395725, Crash [@ nsIFrame::GetFrameSelection], r+sr+a=roc

This commit is contained in:
Olli.Pettay@helsinki.fi 2007-09-15 12:48:20 -07:00
parent abb6a084a1
commit d3285a6bc7

View File

@ -2032,6 +2032,8 @@ nsFrame::PeekBackwardAndForward(nsSelectionAmount aAmountBack,
if (NS_FAILED(rv))
return rv;
// Keep frameSelection alive.
nsRefPtr<nsFrameSelection> frameSelection = GetFrameSelection();
nsCOMPtr<nsISelection> selection;
if (NS_SUCCEEDED(selcon->GetSelection(nsISelectionController::SELECTION_NORMAL,
getter_AddRefs(selection)))){
@ -2045,7 +2047,7 @@ nsFrame::PeekBackwardAndForward(nsSelectionAmount aAmountBack,
//no release
// maintain selection
return GetFrameSelection()->MaintainSelection(aAmountBack);
return frameSelection->MaintainSelection(aAmountBack);
}
// Figure out which view we should point capturing at, given that drag started