winefile: Fix NULL pointer deref in read_tree.

This commit is contained in:
Rich Ercolani 2009-01-10 04:48:54 -05:00 committed by Alexandre Julliard
parent 5e79b0608d
commit ae48e099da
1 changed files with 8 additions and 1 deletions

View File

@ -3781,8 +3781,15 @@ static void refresh_child(ChildWnd* child)
scan_entry(child, &child->root.entry, 0, child->hwnd); scan_entry(child, &child->root.entry, 0, child->hwnd);
#ifdef _SHELL_FOLDERS #ifdef _SHELL_FOLDERS
if (child->root.entry.etype == ET_SHELL) if (child->root.entry.etype == ET_SHELL)
entry = read_tree(&child->root, NULL, get_path_pidl(path,child->hwnd), drv, child->sortOrder, child->hwnd); {
LPITEMIDLIST local_pidl = get_path_pidl(path,child->hwnd);
if (local_pidl)
entry = read_tree(&child->root, NULL, local_pidl , drv, child->sortOrder, child->hwnd);
else
entry = NULL;
}
else else
#endif #endif
entry = read_tree(&child->root, path, NULL, drv, child->sortOrder, child->hwnd); entry = read_tree(&child->root, path, NULL, drv, child->sortOrder, child->hwnd);