| commit | f3ea345b2d37064acfd910b9b8285ca34de7ff8e | [log] [tgz] |
|---|---|---|
| author | James Hatheway <james@macadamian.com> | Fri Jan 12 23:01:41 2001 +0000 |
| committer | Alexandre Julliard <julliard@winehq.org> | Fri Jan 12 23:01:41 2001 +0000 |
| tree | 85bee865c073f59fc9cb6193cd974911ec518801 | |
| parent | 0b47b289a84aeb9f97ddf00e28e53e3b7487df99 [diff] |
Guard against incoming string of NULL in WM_SETTEXT.
diff --git a/controls/edit.c b/controls/edit.c index 491b317..e0c4d27 100644 --- a/controls/edit.c +++ b/controls/edit.c
@@ -4467,11 +4467,11 @@ */ static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPARAM lParam, BOOL unicode) { - LPWSTR text; + LPWSTR text = NULL; if(unicode) text = (LPWSTR)lParam; - else + else if (lParam) { LPCSTR textA = (LPCSTR)lParam; INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);