Sergey Khodych : comctl32/toolbar: Use proper button index when freeing a string in TOOLBAR_DeleteButton.
Alexandre Julliard
julliard at winehq.org
Mon Nov 23 08:49:54 CST 2009
Module: wine
Branch: master
Commit: fa7c2b5c5ffba17ce5849928c4e68296f4cd5f46
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa7c2b5c5ffba17ce5849928c4e68296f4cd5f46
Author: Sergey Khodych <khodych at gmail.com>
Date: Sun Nov 22 22:37:19 2009 +0200
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);
}
More information about the wine-cvs
mailing list