diff options
author | David Robillard <d@drobilla.net> | 2006-06-12 17:57:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-12 17:57:01 +0000 |
commit | 0f86e6b4544aa89c59a1361bbe837f4b3bd5bd66 (patch) | |
tree | ed40d5df599d165a55e774d1ce99a94e4d18b9e3 /src/libs/engine | |
parent | e3600c6bd795fabff12faa4352bf3ba76b324222 (diff) | |
download | ingen-0f86e6b4544aa89c59a1361bbe837f4b3bd5bd66.tar.gz ingen-0f86e6b4544aa89c59a1361bbe837f4b3bd5bd66.tar.bz2 ingen-0f86e6b4544aa89c59a1361bbe837f4b3bd5bd66.zip |
Fixed engine-side node destruction bug
git-svn-id: http://svn.drobilla.net/lad/grauph@34 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/QueuedEngineInterface.cpp | 2 | ||||
-rw-r--r-- | src/libs/engine/QueuedEvent.h | 2 | ||||
-rw-r--r-- | src/libs/engine/events/DestroyEvent.cpp | 5 | ||||
-rw-r--r-- | src/libs/engine/events/DestroyEvent.h | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp index 0734eb7a..1b50deb9 100644 --- a/src/libs/engine/QueuedEngineInterface.cpp +++ b/src/libs/engine/QueuedEngineInterface.cpp @@ -149,7 +149,7 @@ QueuedEngineInterface::rename(const string& old_path, void QueuedEngineInterface::destroy(const string& path) { - DestroyEvent* ev = new DestroyEvent(_responder, path); + DestroyEvent* ev = new DestroyEvent(_responder, this, path); push(ev); } diff --git a/src/libs/engine/QueuedEvent.h b/src/libs/engine/QueuedEvent.h index 16560aaa..0cdaacdb 100644 --- a/src/libs/engine/QueuedEvent.h +++ b/src/libs/engine/QueuedEvent.h @@ -70,7 +70,7 @@ protected: : Event(responder), m_pre_processed(false), m_blocking(blocking), m_source(source) {} - // NULL event base (for internal events) + // NULL event base (for internal events only!) QueuedEvent() : Event(), m_pre_processed(false), m_blocking(false), m_source(NULL) {} diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index 3988195a..85ec0011 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -35,8 +35,8 @@ namespace Om { -DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, const string& path, bool lock_mutex) -: QueuedEvent(responder, true), +DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, QueuedEventSource* source, const string& path, bool lock_mutex) +: QueuedEvent(responder, true, source), m_path(path), m_node(NULL), m_patch_listnode(NULL), @@ -142,6 +142,7 @@ DestroyEvent::execute(samplecount offset) void DestroyEvent::post_process() { + assert(m_source); m_source->unblock(); if (m_node == NULL) { diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h index fc579bf4..8ad5deba 100644 --- a/src/libs/engine/events/DestroyEvent.h +++ b/src/libs/engine/events/DestroyEvent.h @@ -44,7 +44,7 @@ class DisconnectPortEvent; class DestroyEvent : public QueuedEvent { public: - DestroyEvent(CountedPtr<Responder> responder, const string& path, bool lock_mutex = true); + DestroyEvent(CountedPtr<Responder> responder, QueuedEventSource* source, const string& path, bool lock_mutex = true); DestroyEvent(CountedPtr<Responder> responder, Node* node, bool lock_mutex = true); ~DestroyEvent(); |