Merge pull request #593 from dankan1890/master

Use nothrow allocation in these circumstance.
This commit is contained in:
Miodrag Milanović 2016-01-30 10:30:23 +01:00
commit ea2dd69fab
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; membuffersize = blitwidth * blitheight * 4;
global_free_array(membuffer); global_free_array(membuffer);
membuffer = global_alloc_array(UINT8, membuffersize); membuffer = global_alloc_array_nothrow(UINT8, membuffersize);
} }
if (membuffer == NULL) if (membuffer == NULL)
goto error; 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 necessary, allocate a temporary buffer and fetch the data
if (size > sizeof(small_buffer)) if (size > sizeof(small_buffer))
{ {
data = global_alloc_array(BYTE, size); data = global_alloc_array_nothrow(BYTE, size);
if (data == NULL) if (data == NULL)
return result; return result;
} }