shell32: Don't crash if selection is NULL.

This commit is contained in:
André Hentschel 2011-04-28 22:31:31 +02:00 committed by Alexandre Julliard
parent ca3b820227
commit e556b45f43
1 changed files with 2 additions and 0 deletions

View File

@ -782,6 +782,8 @@ static BOOL BrsFolder_OnSetSelectionW(browse_info *info, LPVOID selection, BOOL
HTREEITEM hItem;
BOOL bResult;
if (!selection) return FALSE;
bResult = BrsFolder_OnSetExpanded(info, selection, is_str, &hItem);
if (bResult)
SendMessageW(info->hwndTreeView, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hItem );