Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbejy@wpi.edu>
HEADER_InsertItemA and HEADER_InsertItemW now treat null pointers to text strings as null strings, as Windows does. Fixes wine crash on startup of CuteFTP.
This commit is contained in:
parent
9adef53dee
commit
60e414fb65
|
@ -762,6 +762,8 @@ HEADER_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
lpItem->cxy = phdi->cxy;
|
||||
|
||||
if (phdi->mask & HDI_TEXT) {
|
||||
if (!phdi->pszText) /* null pointer check */
|
||||
phdi->pszText = "";
|
||||
if (phdi->pszText != LPSTR_TEXTCALLBACKA) {
|
||||
len = lstrlenA (phdi->pszText);
|
||||
lpItem->pszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR));
|
||||
|
@ -846,6 +848,8 @@ HEADER_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
lpItem->cxy = phdi->cxy;
|
||||
|
||||
if (phdi->mask & HDI_TEXT) {
|
||||
if (!phdi->pszText) /* null pointer check */
|
||||
phdi->pszText = "";
|
||||
if (phdi->pszText != LPSTR_TEXTCALLBACKW) {
|
||||
len = lstrlenW (phdi->pszText);
|
||||
lpItem->pszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR));
|
||||
|
|
Loading…
Reference in New Issue