fix for #17763 - initialize cellFrame so that if it's not found, the null check succeeds
r=hyatt a=chofmann
This commit is contained in:
Родитель
38a8ca4e67
Коммит
e82be7c63a
|
@ -74,9 +74,11 @@ void nsTreeFrame::SetSelection(nsIPresContext& aPresContext, nsTreeCellFrame* aF
|
||||||
nsCOMPtr<nsIContent> cellContent;
|
nsCOMPtr<nsIContent> cellContent;
|
||||||
aFrame->GetContent(getter_AddRefs(cellContent));
|
aFrame->GetContent(getter_AddRefs(cellContent));
|
||||||
|
|
||||||
|
if (!cellContent) return;
|
||||||
nsCOMPtr<nsIContent> rowContent;
|
nsCOMPtr<nsIContent> rowContent;
|
||||||
cellContent->GetParent(*getter_AddRefs(rowContent));
|
cellContent->GetParent(*getter_AddRefs(rowContent));
|
||||||
|
|
||||||
|
if (!rowContent) return;
|
||||||
nsCOMPtr<nsIContent> itemContent;
|
nsCOMPtr<nsIContent> itemContent;
|
||||||
rowContent->GetParent(*getter_AddRefs(itemContent));
|
rowContent->GetParent(*getter_AddRefs(itemContent));
|
||||||
|
|
||||||
|
@ -210,7 +212,7 @@ nsTreeFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||||
treeRowGroup->EnsureRowIsVisible(rowIndex);
|
treeRowGroup->EnsureRowIsVisible(rowIndex);
|
||||||
|
|
||||||
// Now that the row is scrolled into view, we have a frame created. We can retrieve the cell.
|
// Now that the row is scrolled into view, we have a frame created. We can retrieve the cell.
|
||||||
nsTreeCellFrame* cellFrame;
|
nsTreeCellFrame* cellFrame=nsnull;
|
||||||
treeRowGroup->GetCellFrameAtIndex(rowIndex, cellIndex, &cellFrame);
|
treeRowGroup->GetCellFrameAtIndex(rowIndex, cellIndex, &cellFrame);
|
||||||
if (!cellFrame)
|
if (!cellFrame)
|
||||||
return NS_OK; // No cell. Whatever. Bail.
|
return NS_OK; // No cell. Whatever. Bail.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче