From 1196aed33f2e0765abc063c8d35cbf9148a99850 Mon Sep 17 00:00:00 2001 From: Daniel Jelinski Date: Sat, 2 Jun 2012 07:23:32 +0200 Subject: [PATCH] comctl32: Allow label edit only if treeview style allows editing. --- dlls/comctl32/treeview.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 63e350725aa..8c93f8c3d14 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3810,6 +3810,9 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) TEXTMETRICW textMetric; TRACE("%p %p\n", hwnd, hItem); + if (!(infoPtr->dwStyle & TVS_EDITLABELS)) + return NULL; + if (!TREEVIEW_ValidItem(infoPtr, hItem)) return NULL;