André Hentschel : shell32: Don' t crash if selection is NULL.
Alexandre Julliard
julliard at winehq.org
Fri Apr 29 11:09:13 CDT 2011
Module: wine
Branch: master
Commit: e556b45f4380ffeb6d87a215085285ca1feaf2d2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e556b45f4380ffeb6d87a215085285ca1feaf2d2
Author: André Hentschel <nerv at dawncrow.de>
Date: Thu Apr 28 22:31:31 2011 +0200
shell32: Don't crash if selection is NULL.
---
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 );
More information about the wine-cvs
mailing list