Use nothrow allocation in these circumstance.

This commit is contained in:
dankan1890 2016-01-30 09:31:46 +01:00
parent dbb6c11313
commit 29ba71768c
2 changed files with 2 additions and 2 deletions

View File

@ -566,7 +566,7 @@ int renderer_dd::ddraw_create_surfaces()
{
membuffersize = blitwidth * blitheight * 4;
global_free_array(membuffer);
membuffer = global_alloc_array(UINT8, membuffersize);
membuffer = global_alloc_array_nothrow(UINT8, membuffersize);
}
if (membuffer == NULL)
goto error;

View File

@ -661,7 +661,7 @@ BOOL wininput_handle_raw(HANDLE device)
// if necessary, allocate a temporary buffer and fetch the data
if (size > sizeof(small_buffer))
{
data = global_alloc_array(BYTE, size);
data = global_alloc_array_nothrow(BYTE, size);
if (data == NULL)
return result;
}