Commit 69bf1856 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

user32: EM_REPLACESEL - handle OOM error.

parent 4d96ffb5
......@@ -4525,7 +4525,7 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
{
LPSTR textA = (LPSTR)lParam;
INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
if (!(textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR)))) break;
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
}
......
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