Commit 7a9a2aa1 authored by Serge Ivanov's avatar Serge Ivanov Committed by Alexandre Julliard

Simple NULL check.

parent 163830c5
...@@ -651,8 +651,12 @@ HEADER_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -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) ...@@ -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;
} }
......
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