summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-01-07 13:46:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-01-07 13:46:19 +0000
commitde09dd655f75e896e6063c2c0a41a8e4a19a1784 (patch)
tree911f36b9ce656b68b842bcbdeedc3d1a89016153 /src
parent8dde424e07689d32a1bf4e38c9f74e068f7b0cc7 (diff)
fix for a stupid crash in win api
git-svn-id: http://svn.miranda-ng.org/main/trunk@16049 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/src/ui_utils.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}