From b4e4bd87330bc9d5d6e11d398cb1f08e70eb022d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Apr 2016 19:10:06 +0200 Subject: [PATCH] fix crash introduced in 0d1cd3865d --- libs/ardour/plugin_insert.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 0aa2ad6324..94f5ba62c0 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -1244,7 +1244,6 @@ PluginInsert::sanitize_maps () bool PluginInsert::reset_map (bool emit) { - uint32_t pc = 0; const PinMappings old_in (_in_map); const PinMappings old_out (_out_map); @@ -1255,6 +1254,7 @@ PluginInsert::reset_map (bool emit) /* build input map */ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { uint32_t sc = 0; // side-chain round-robin (all instances) + uint32_t pc = 0; for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i, ++pc) { const uint32_t nis = natural_input_streams ().get(*t); const uint32_t stride = nis - sidechain_input_pins().get (*t); @@ -1297,6 +1297,7 @@ PluginInsert::reset_map (bool emit) } /* build output map */ + uint32_t pc = 0; for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i, ++pc) { _out_map[pc] = ChanMapping (ChanCount::min (natural_output_streams(), _configured_out)); for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {