comctl32 header: Free the old string also when the new one is LPSTR_TEXTCALLBACK.
This commit is contained in:
parent
16fefcd6d9
commit
25d66de358
|
@ -131,9 +131,6 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, HDITEMW *phdi, BOOL
|
|||
|
||||
if (phdi->mask & HDI_TEXT)
|
||||
{
|
||||
if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */
|
||||
{
|
||||
LPWSTR pszText;
|
||||
if (lpItem->pszText)
|
||||
{
|
||||
if (lpItem->pszText != emptyString && lpItem->pszText != LPSTR_TEXTCALLBACKW)
|
||||
|
@ -141,7 +138,9 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, HDITEMW *phdi, BOOL
|
|||
lpItem->pszText = NULL;
|
||||
}
|
||||
|
||||
pszText = (phdi->pszText != NULL ? phdi->pszText : emptyString);
|
||||
if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */
|
||||
{
|
||||
LPWSTR pszText = (phdi->pszText != NULL ? phdi->pszText : emptyString);
|
||||
if (fUnicode)
|
||||
Str_SetPtrW(&lpItem->pszText, pszText);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue