summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/CreatePatchEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-06 19:39:56 +0000
committerDavid Robillard <d@drobilla.net>2007-01-06 19:39:56 +0000
commit69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f (patch)
tree68fd1ea83beedaaaa97846ed09240a3585b2d931 /src/libs/engine/events/CreatePatchEvent.cpp
parent2122a857662203936a04a39df7d0e1ad1db82853 (diff)
downloadingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.tar.gz
ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.tar.bz2
ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.zip
Added ability to get Raul Thread for current calling context.
Strong threading assertions. Flowcanvas port removal fixes. Patch port destruction. Code cleanups, bug fixes. git-svn-id: http://svn.drobilla.net/lad/ingen@234 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/CreatePatchEvent.cpp')
-rw-r--r--src/libs/engine/events/CreatePatchEvent.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp
index 9124f280..73813dbb 100644
--- a/src/libs/engine/events/CreatePatchEvent.cpp
+++ b/src/libs/engine/events/CreatePatchEvent.cpp
@@ -45,7 +45,7 @@ CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responde
void
CreatePatchEvent::pre_process()
{
- if (_engine.object_store()->find(m_path) != NULL) {
+ if (m_path == "/" || _engine.object_store()->find(m_path) != NULL) {
m_error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
@@ -57,13 +57,11 @@ CreatePatchEvent::pre_process()
return;
}
- if (m_path != "/") {
- m_parent = _engine.object_store()->find_patch(m_path.parent());
- if (m_parent == NULL) {
- m_error = PARENT_NOT_FOUND;
- QueuedEvent::pre_process();
- return;
- }
+ m_parent = _engine.object_store()->find_patch(m_path.parent());
+ if (m_parent == NULL) {
+ m_error = PARENT_NOT_FOUND;
+ QueuedEvent::pre_process();
+ return;
}
size_t poly = 1;