From 8130a946d501165e6151449490c621924820007d Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Sat, 15 Aug 2009 22:06:09 +0000 Subject: [PATCH 1/1] Apply changes from r42521 to DefWndProcW as well See issue #4791 for more details. svn path=/trunk/; revision=42718 --- reactos/dll/win32/user32/windows/defwnd.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/reactos/dll/win32/user32/windows/defwnd.c index 3ac178b4ba9..e6ef7925a4c 100644 --- a/reactos/dll/win32/user32/windows/defwnd.c +++ b/reactos/dll/win32/user32/windows/defwnd.c @@ -2037,12 +2037,18 @@ DefWindowProcW(HWND hWnd, { case WM_NCCREATE: { - LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam; - /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP) - * may have child window IDs instead of window name */ + if (lParam) + { + LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam; + /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP) + * may have child window IDs instead of window name */ - DefSetText(hWnd, cs->lpszName, FALSE); - Result = 1; + if (HIWORD(cs->lpszName)) + { + DefSetText(hWnd, cs->lpszName, FALSE); + } + Result = 1; + } break; } -- 2.17.1