mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
VST3: Fix MSVC related crashes
Do not simply allocate std::vector<> space but also initialize elements. The data is later accessed as C-pointer array: &var[0]. With most compilers simply reserving space in the vector is sufficient in order to later access the elements directly. However actually placing objects in the vector before referencing them is more correct.
This commit is contained in:
parent
e81794d878
commit
cb0b152b35
1 changed files with 2 additions and 2 deletions
|
|
@ -1077,8 +1077,8 @@ VST3PI::VST3PI (boost::shared_ptr<ARDOUR::VST3PluginModule> m, std::string uniqu
|
|||
_n_bus_in = _component->getBusCount (Vst::kAudio, Vst::kInput);
|
||||
_n_bus_out = _component->getBusCount (Vst::kAudio, Vst::kOutput);
|
||||
|
||||
_busbuf_in.reserve (_n_bus_in);
|
||||
_busbuf_out.reserve (_n_bus_out);
|
||||
_busbuf_in.resize (_n_bus_in);
|
||||
_busbuf_out.resize (_n_bus_out);
|
||||
|
||||
/* do not re-order, _io_name is build in sequence */
|
||||
_n_inputs = count_channels (Vst::kAudio, Vst::kInput, Vst::kMain);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue