mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Properly catching another out of memory condition
This commit is contained in:
parent
4251194fe5
commit
402d84ff34
@ -654,9 +654,14 @@ floperr_t floppy_format_track(floppy_image_legacy *floppy, int head, int track,
|
||||
/* create a dummy resolution; if no parameters were specified */
|
||||
if (!parameters)
|
||||
{
|
||||
alloc_resolution = std::make_unique<util::option_resolution>(floppy_option_guide);
|
||||
if (!alloc_resolution)
|
||||
try
|
||||
{
|
||||
alloc_resolution = std::make_unique<util::option_resolution>(floppy_option_guide);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return FLOPPY_ERROR_OUTOFMEMORY;
|
||||
}
|
||||
alloc_resolution->set_specification(floppy->floppy_option->param_guidelines);
|
||||
|
||||
parameters = alloc_resolution.get();
|
||||
|
Loading…
Reference in New Issue
Block a user