mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
catch OOM
This commit is contained in:
parent
23f285f126
commit
dbcf22a832
1 changed files with 7 additions and 1 deletions
|
|
@ -148,7 +148,13 @@ Worker::run()
|
|||
|
||||
if (size > buf_size) {
|
||||
buf = realloc(buf, size);
|
||||
buf_size = size;
|
||||
if (buf) {
|
||||
buf_size = size;
|
||||
} else {
|
||||
PBD::error << "Worker: Error allocating memory"
|
||||
<< endmsg;
|
||||
buf_size = 0; // TODO: This is probably fatal
|
||||
}
|
||||
}
|
||||
|
||||
if (_requests->read((uint8_t*)buf, size) < size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue