From de09dd655f75e896e6063c2c0a41a8e4a19a1784 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 Jan 2016 13:46:19 +0000 Subject: fix for a stupid crash in win api git-svn-id: http://svn.miranda-ng.org/main/trunk@16049 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/src/ui_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mir_core') diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index 270bf762c9..55f8f3d1fa 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -1411,7 +1411,7 @@ HTREEITEM CCtrlTreeView::MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter) tvis.itemex.stateMask = tvis.itemex.state; tvis.itemex.lParam = saveOldData; - tvis.hParent = GetParent(hInsertAfter); + tvis.hParent = (hInsertAfter == TVI_FIRST) ? NULL : GetParent(hInsertAfter); tvis.hInsertAfter = hInsertAfter; return InsertItem(&tvis); } -- cgit v1.2.3