>From 70264cc0a43175c9183c9a6eb9775ebbee1120af Mon Sep 17 00:00:00 2001 From: Sergey Khodych Date: Sun, 22 Nov 2009 22:37:19 +0200 Subject: comctl32/toolbar: Use proper button index when freeing a string in TOOLBAR_DeleteButton. --- dlls/comctl32/toolbar.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 9481840..1cbdd6f 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3230,8 +3230,8 @@ TOOLBAR_DeleteButton (TOOLBAR_INFO *infoPtr, INT nIndex) (infoPtr->nNumButtons - nIndex) * sizeof(TBUTTON_INFO)); } - if (TOOLBAR_ButtonHasString(oldButtons)) - Free((LPWSTR)oldButtons->iString); + if (TOOLBAR_ButtonHasString(&oldButtons[nIndex])) + Free((LPWSTR)oldButtons[nIndex].iString); Free (oldButtons); } -- 1.6.5.2