projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23f285f
)
catch OOM
author
Robin Gareus
<robin@gareus.org>
Sun, 23 Mar 2014 01:18:49 +0000
(
02:18
+0100)
committer
Robin Gareus
<robin@gareus.org>
Sun, 23 Mar 2014 01:18:49 +0000
(
02:18
+0100)
libs/ardour/worker.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/worker.cc
b/libs/ardour/worker.cc
index 5b416afa4629fe0e824348f966bd2c43f8a9fd69..aea1c6f8e35597a191cf374c617d928376f8dda2 100644
(file)
--- 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) {