Commit 4fa52588 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Check that lpCreate->lpszName is non-NULL.

parent 6f7797bc
...@@ -834,13 +834,15 @@ STATUSBAR_WMCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -834,13 +834,15 @@ STATUSBAR_WMCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (IsWindowUnicode (hwnd)) { if (IsWindowUnicode (hwnd)) {
self->bUnicode = TRUE; self->bUnicode = TRUE;
if ((len = lstrlenW ((LPCWSTR)lpCreate->lpszName))) { if (lpCreate->lpszName &&
(len = lstrlenW ((LPCWSTR)lpCreate->lpszName))) {
self->parts[0].text = COMCTL32_Alloc ((len + 1)*sizeof(WCHAR)); self->parts[0].text = COMCTL32_Alloc ((len + 1)*sizeof(WCHAR));
lstrcpyW (self->parts[0].text, (LPCWSTR)lpCreate->lpszName); lstrcpyW (self->parts[0].text, (LPCWSTR)lpCreate->lpszName);
} }
} }
else { else {
if ((len = lstrlenA ((LPCSTR)lpCreate->lpszName))) { if (lpCreate->lpszName &&
(len = lstrlenA ((LPCSTR)lpCreate->lpszName))) {
self->parts[0].text = COMCTL32_Alloc ((len + 1)*sizeof(WCHAR)); self->parts[0].text = COMCTL32_Alloc ((len + 1)*sizeof(WCHAR));
lstrcpyAtoW (self->parts[0].text, (LPCSTR)lpCreate->lpszName); lstrcpyAtoW (self->parts[0].text, (LPCSTR)lpCreate->lpszName);
} }
......
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