Simple NULL check.
This commit is contained in:
parent
163830c569
commit
7a9a2aa104
|
@ -651,8 +651,12 @@ HEADER_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
phdi->lParam = lpItem->lParam;
|
phdi->lParam = lpItem->lParam;
|
||||||
|
|
||||||
if (phdi->mask & HDI_TEXT) {
|
if (phdi->mask & HDI_TEXT) {
|
||||||
if (lpItem->pszText != LPSTR_TEXTCALLBACKW)
|
if (lpItem->pszText != LPSTR_TEXTCALLBACKW) {
|
||||||
lstrcpynWtoA (phdi->pszText, lpItem->pszText, phdi->cchTextMax);
|
if (lpItem->pszText)
|
||||||
|
lstrcpynWtoA (phdi->pszText, lpItem->pszText, phdi->cchTextMax);
|
||||||
|
else
|
||||||
|
*phdi->pszText = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
phdi->pszText = LPSTR_TEXTCALLBACKA;
|
phdi->pszText = LPSTR_TEXTCALLBACKA;
|
||||||
}
|
}
|
||||||
|
@ -699,8 +703,12 @@ HEADER_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
phdi->lParam = lpItem->lParam;
|
phdi->lParam = lpItem->lParam;
|
||||||
|
|
||||||
if (phdi->mask & HDI_TEXT) {
|
if (phdi->mask & HDI_TEXT) {
|
||||||
if (lpItem->pszText != LPSTR_TEXTCALLBACKW)
|
if (lpItem->pszText != LPSTR_TEXTCALLBACKW) {
|
||||||
lstrcpynW (phdi->pszText, lpItem->pszText, phdi->cchTextMax);
|
if (lpItem->pszText)
|
||||||
|
lstrcpynW (phdi->pszText, lpItem->pszText, phdi->cchTextMax);
|
||||||
|
else
|
||||||
|
*phdi->pszText = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
phdi->pszText = LPSTR_TEXTCALLBACKW;
|
phdi->pszText = LPSTR_TEXTCALLBACKW;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue