From 6b18de71d1c603255b263a64434005306f152f13 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 19 Feb 2011 05:10:29 +0000 Subject: Save/load patches as nested bundles (fix ticket #520). Sane (context-based, ala RDF quads) approach to the problem of externally visible / internally visible properties. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2993 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/NodeImpl.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/engine/NodeImpl.cpp') diff --git a/src/engine/NodeImpl.cpp b/src/engine/NodeImpl.cpp index e2bb1139..7c1e185a 100644 --- a/src/engine/NodeImpl.cpp +++ b/src/engine/NodeImpl.cpp @@ -91,7 +91,7 @@ NodeImpl::activate(BufferFactory& bufs) assert(!_activated); _activated = true; - for (unsigned long p = 0; p < num_ports(); ++p) { + for (uint32_t p = 0; p < num_ports(); ++p) { PortImpl* const port = _ports->at(p); port->setup_buffers(bufs, port->poly()); port->connect_buffers(); @@ -130,8 +130,9 @@ NodeImpl::prepare_poly(BufferFactory& bufs, uint32_t poly) if (!_polyphonic) poly = 1; - for (size_t i = 0; i < _ports->size(); ++i) - _ports->at(i)->prepare_poly(bufs, poly); + if (_ports) + for (size_t i = 0; i < _ports->size(); ++i) + _ports->at(i)->prepare_poly(bufs, poly); return true; } @@ -147,8 +148,9 @@ NodeImpl::apply_poly(Raul::Maid& maid, uint32_t poly) _polyphony = poly; - for (size_t i = 0; i < num_ports(); ++i) - _ports->at(i)->apply_poly(maid, poly); + if (_ports) + for (size_t i = 0; i < num_ports(); ++i) + _ports->at(i)->apply_poly(maid, poly); return true; } -- cgit v1.2.1