Commit fa7c2b5c authored by Sergey Khodych's avatar Sergey Khodych Committed by Alexandre Julliard

comctl32/toolbar: Use proper button index when freeing a string in TOOLBAR_DeleteButton.

parent 12da91b8
...@@ -3230,8 +3230,8 @@ TOOLBAR_DeleteButton (TOOLBAR_INFO *infoPtr, INT nIndex) ...@@ -3230,8 +3230,8 @@ TOOLBAR_DeleteButton (TOOLBAR_INFO *infoPtr, INT nIndex)
(infoPtr->nNumButtons - nIndex) * sizeof(TBUTTON_INFO)); (infoPtr->nNumButtons - nIndex) * sizeof(TBUTTON_INFO));
} }
if (TOOLBAR_ButtonHasString(oldButtons)) if (TOOLBAR_ButtonHasString(&oldButtons[nIndex]))
Free((LPWSTR)oldButtons->iString); Free((LPWSTR)oldButtons[nIndex].iString);
Free (oldButtons); Free (oldButtons);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment