Bug 468360 - tree without treecols definition crashes the browser in [@XULTreeAccessible::TreeViewInvalidated], patch=timeless, r=me

This commit is contained in:
Alexander Surkov 2009-05-13 13:21:21 +08:00
parent f49aa83b85
commit cd10ad3b55

View File

@ -588,6 +588,9 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
rv = cols->GetKeyColumn(getter_AddRefs(col));
NS_ENSURE_SUCCESS(rv, rv);
if (!col)
return NS_OK;
PRInt32 colIdx = 0;
rv = col->GetIndex(&colIdx);
NS_ENSURE_SUCCESS(rv, rv);
@ -676,6 +679,9 @@ nsXULTreeAccessible::TreeViewInvalidated(PRInt32 aStartRow, PRInt32 aEndRow,
rv = treeColumns->GetKeyColumn(getter_AddRefs(col));
NS_ENSURE_SUCCESS(rv, rv);
if (!col)
return NS_OK;
PRInt32 colIdx = 0;
rv = col->GetIndex(&colIdx);
NS_ENSURE_SUCCESS(rv, rv);