From: Gregor Schneider Date: Sat, 15 Aug 2009 22:06:09 +0000 (+0000) Subject: Apply changes from r42521 to DefWndProcW as well X-Git-Tag: ReactOS-0.3.11~1161 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=8130a946d501165e6151449490c621924820007d Apply changes from r42521 to DefWndProcW as well See issue #4791 for more details. svn path=/trunk/; revision=42718 --- 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; }