diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index 9b0d20be2a7..3824c4e806a 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -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 );