mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
Use nothrow allocation in these circumstance.
This commit is contained in:
parent
dbb6c11313
commit
29ba71768c
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user