diff --git a/programs/wineconsole/registry.c b/programs/wineconsole/registry.c index e537a86044b..080431a5ff6 100644 --- a/programs/wineconsole/registry.c +++ b/programs/wineconsole/registry.c @@ -76,7 +76,7 @@ static LPWSTR WINECON_CreateKeyName(LPCWSTR kn) LPWSTR ret = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(kn) + 1) * sizeof(WCHAR)); LPWSTR ptr = ret; - if (!ptr) WINECON_Fatal("OOM"); + if (!ret) return NULL; do { diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index 316c01114b1..fe1cf46e42f 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c @@ -56,8 +56,7 @@ static void WCUSER_FillMemDC(const struct inner_data* data, int upd_tp, int upd_ /* FIXME: could set up a mechanism to reuse the line between different * calls to this function */ - if (!(line = HeapAlloc(GetProcessHeap(), 0, data->curcfg.sb_width * sizeof(WCHAR)))) - WINECON_Fatal("OOM\n"); + if (!(line = HeapAlloc(GetProcessHeap(), 0, data->curcfg.sb_width * sizeof(WCHAR)))) return; dx = HeapAlloc( GetProcessHeap(), 0, data->curcfg.sb_width * sizeof(*dx) ); hOldFont = SelectObject(PRIVATE(data)->hMemDC, PRIVATE(data)->hFont); @@ -169,7 +168,7 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL w16b = ((data->curcfg.cell_width + 15) & ~15) / 8; ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, w16b * data->curcfg.cell_height); - if (!ptr) WINECON_Fatal("OOM"); + if (!ptr) return; nbl = max((data->curcfg.cell_height * size) / 100, 1); for (j = data->curcfg.cell_height - nbl; j < data->curcfg.cell_height; j++) { diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index d6efa2f8762..d1d38beed02 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -655,11 +655,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna GetStartupInfoW(&si); - if (pid == 0) - { - if (!si.lpTitle) WINECON_Fatal("Should have a title set"); - appname = si.lpTitle; - } + if (pid == 0) appname = si.lpTitle; data->nCmdShow = nCmdShow; /* load settings */ @@ -729,7 +725,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna WINECON_GetServerConfig(data); data->cells = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, data->curcfg.sb_width * data->curcfg.sb_height * sizeof(CHAR_INFO)); - if (!data->cells) WINECON_Fatal("OOM\n"); + if (!data->cells) goto error; data->fnResizeScreenBuffer(data); data->fnComputePositions(data); WINECON_SetConfig(data, &cfg);