X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsession_events.cc;h=d41b9c50021169dc1ccabe9529a4524dc374fb67;hb=fe85575a12d8c81e8d2d08b7d91238a88c8febe7;hp=0208c03cb127c1ba3bcfdcb14d36a2b197e1b76d;hpb=1a5a48436a2b9627d640736603341e1b21fe45d9;p=ardour.git diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index 0208c03cb1..d41b9c5002 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -86,7 +86,7 @@ SessionEvent::operator new (size_t) void SessionEvent::operator delete (void *ptr, size_t /*size*/) { - Pool* p = pool->per_thread_pool (); + Pool* p = pool->per_thread_pool (false); SessionEvent* ev = static_cast (ptr); DEBUG_TRACE (DEBUG::SessionEvents, string_compose ( @@ -100,9 +100,10 @@ SessionEvent::operator delete (void *ptr, size_t /*size*/) } #endif - if (p == ev->own_pool) { + if (p && p == ev->own_pool) { p->release (ptr); } else { + assert(ev->own_pool); ev->own_pool->push (ev); DEBUG_TRACE (DEBUG::SessionEvents, string_compose ("%1 was wrong thread for this pool, pushed event onto pending list, will be deleted on next alloc from %2 pool size %3 free %4 used %5 pending %6\n", pthread_name(), ev->own_pool->name(),