summaryrefslogtreecommitdiff
path: root/libs/ardour/worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/worker.cc')
-rw-r--r--libs/ardour/worker.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/worker.cc b/libs/ardour/worker.cc
index 5b416afa46..aea1c6f8e3 100644
--- a/libs/ardour/worker.cc
+++ b/libs/ardour/worker.cc
@@ -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) {