mirror of
https://github.com/holub/mame
synced 2025-06-28 15:14:21 +03:00
Merge pull request #593 from dankan1890/master
Use nothrow allocation in these circumstance.
This commit is contained in:
commit
ea2dd69fab
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user