summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-23 00:57:57 +0000
committerDavid Robillard <d@drobilla.net>2012-05-23 00:57:57 +0000
commit7ca44cb8800a2800e58fadd0267416224650e08d (patch)
tree10a5a313b1fbf0fdbd9f16cd4ed1d4b8ed89fa74 /src/server/events
parent2777835076e1ee319eaeee0a0b0acaad70931ac5 (diff)
downloadingen-7ca44cb8800a2800e58fadd0267416224650e08d.tar.gz
ingen-7ca44cb8800a2800e58fadd0267416224650e08d.tar.bz2
ingen-7ca44cb8800a2800e58fadd0267416224650e08d.zip
Fix crash when loading polyphonic patches.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4442 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/SetMetadata.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp
index e8cce384..cc2ae563 100644
--- a/src/server/events/SetMetadata.cpp
+++ b/src/server/events/SetMetadata.cpp
@@ -303,16 +303,17 @@ SetMetadata::execute(ProcessContext& context)
case POLYPHONIC: {
PatchImpl* parent = reinterpret_cast<PatchImpl*>(object->parent());
if (value.get_bool()) {
- object->apply_poly(context, *_engine.maid(), parent->internal_poly());
+ object->apply_poly(
+ context, *_engine.maid(), parent->internal_poly_process());
} else {
object->apply_poly(context, *_engine.maid(), 1);
}
} break;
case POLYPHONY:
- if (_patch->internal_poly() != static_cast<uint32_t>(value.get_int32()) &&
- !_patch->apply_internal_poly(context,
+ if (!_patch->apply_internal_poly(context,
*_engine.buffer_factory(),
- *_engine.maid(), value.get_int32())) {
+ *_engine.maid(),
+ value.get_int32())) {
_status = INTERNAL_ERROR;
}
break;