diff options
author | David Robillard <d@drobilla.net> | 2006-07-04 00:08:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-07-04 00:08:00 +0000 |
commit | 2d518cb42f7707503efc289badb4cac9a3396a17 (patch) | |
tree | 9d22839d5f64ec26405ca0cfd2bec1166ddad437 /src/libs/engine/events/AddPortEvent.cpp | |
parent | 62d76290ae0eb783db0e24338c17adb08d845a73 (diff) | |
download | ingen-2d518cb42f7707503efc289badb4cac9a3396a17.tar.gz ingen-2d518cb42f7707503efc289badb4cac9a3396a17.tar.bz2 ingen-2d518cb42f7707503efc289badb4cac9a3396a17.zip |
Process order traversal / connection fixes (nasty edge cases where patches are involved)
git-svn-id: http://svn.drobilla.net/lad/ingen@82 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/AddPortEvent.cpp')
-rw-r--r-- | src/libs/engine/events/AddPortEvent.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp index 92c9cfb9..4c530227 100644 --- a/src/libs/engine/events/AddPortEvent.cpp +++ b/src/libs/engine/events/AddPortEvent.cpp @@ -80,7 +80,12 @@ AddPortEvent::pre_process() _patch->add_output(new ListNode<Port*>(_patch_port)); else _patch->add_input(new ListNode<Port*>(_patch_port)); - _ports_array = new Array<Port*>(_patch->num_ports() + 1, _patch->external_ports()); + + if (_patch->external_ports()) + _ports_array = new Array<Port*>(_patch->num_ports() + 1, *_patch->external_ports()); + else + _ports_array = new Array<Port*>(_patch->num_ports() + 1, NULL); + _ports_array->at(_patch->num_ports()) = _patch_port; om->object_store()->add(_patch_port); |