Commit 04a7c567 authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Added check for invalid parent item.

parent 45f88866
......@@ -1389,6 +1389,13 @@ LRESULT WINAPI TREEVIEW_SortChildrenCB(
/* Obtain the TVSORTBC struct */
infoPtr->pCallBackSort = (LPTVSORTCB)lParam;
/* Check for a valid handle to the parent item */
if (!TREEVIEW_ValidItem(infoPtr, infoPtr->pCallBackSort->hParent))
{
ERR ("invalid item hParent=%d\n", (INT)infoPtr->pCallBackSort->hParent);
return FALSE;
}
/* Obtain the parent node to sort */
sortMe = &infoPtr->items[ (INT)infoPtr->pCallBackSort->hParent ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment