We should always have a main item in report mode.

This commit is contained in:
Dimitrie O. Paun 2002-10-28 20:40:21 +00:00 committed by Alexandre Julliard
parent 7e12841030
commit 2d2e6acbbd
1 changed files with 3 additions and 0 deletions

View File

@ -1219,6 +1219,9 @@ static inline BOOL is_autoarrange(LISTVIEW_INFO *infoPtr)
static inline COLUMN_INFO * LISTVIEW_GetColumnInfo(LISTVIEW_INFO *infoPtr, INT nSubItem)
{
static COLUMN_INFO mainItem;
if (nSubItem == 0 && infoPtr->hdpaColumns->nItemCount == 0) return &mainItem;
assert (nSubItem >= 0 && nSubItem < infoPtr->hdpaColumns->nItemCount);
return (COLUMN_INFO *)DPA_GetPtr(infoPtr->hdpaColumns, nSubItem);
}