From d6872aff18a75e14b101996404d08f233b0001a3 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 13 Nov 2003 20:49:00 +0000 Subject: [PATCH] Avoid setting infoPtr->firstVisible to NULL in TREEVIEW_Sort. --- dlls/comctl32/treeview.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 1edfbc3afbc..c33dd5ed373 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3063,6 +3063,7 @@ TREEVIEW_Sort(TREEVIEW_INFO *infoPtr, BOOL fRecurse, HTREEITEM parent, break; } + if (!item) item = parent->firstChild; TREEVIEW_SetFirstVisible(infoPtr, item, FALSE); } @@ -5185,6 +5186,9 @@ static LRESULT WINAPI TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(hwnd); + + TRACE("hwnd %p msg %04x wp=%08x lp=%08lx\n", hwnd, uMsg, wParam, lParam); + if (infoPtr) TREEVIEW_VerifyTree(infoPtr); else {