[1/2] shell32: Don't crash if selection is NULL
André Hentschel
nerv at dawncrow.de
Thu Apr 28 15:31:31 CDT 2011
This fixes a crash which happens with VB6 Apps using brsfolder
---
dlls/shell32/brsfolder.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index 9b0d20b..3824c4e 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 );
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list