summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/pbd/pool.h2
-rw-r--r--libs/pbd/pool.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/pbd/pbd/pool.h b/libs/pbd/pbd/pool.h
index 1c9ac81a3e..cfd782a794 100644
--- a/libs/pbd/pbd/pool.h
+++ b/libs/pbd/pbd/pool.h
@@ -128,7 +128,7 @@ class LIBPBD_API PerThreadPool
const Glib::Threads::Private<CrossThreadPool>& key() const { return _key; }
void create_per_thread_pool (std::string name, unsigned long item_size, unsigned long nitems);
- CrossThreadPool* per_thread_pool ();
+ CrossThreadPool* per_thread_pool (bool must_exist = true);
void set_trash (RingBuffer<CrossThreadPool*>* t);
void add_to_trash (CrossThreadPool *);
diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc
index b3e5c52e1a..020f296f61 100644
--- a/libs/pbd/pool.cc
+++ b/libs/pbd/pool.cc
@@ -179,10 +179,10 @@ PerThreadPool::create_per_thread_pool (string n, unsigned long isize, unsigned l
* calling create_per_thread_pool in the current thread.
*/
CrossThreadPool*
-PerThreadPool::per_thread_pool ()
+PerThreadPool::per_thread_pool (bool must_exist)
{
CrossThreadPool* p = _key.get();
- if (!p) {
+ if (!p && must_exist) {
fatal << "programming error: no per-thread pool \"" << _name << "\" for thread " << pthread_name() << endmsg;
abort(); /*NOTREACHED*/
}