From 206d906c1080e37fa8c17297f62efecebd85b8c9 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 7 Jul 2009 00:45:26 +0200 Subject: [PATCH] RemoteVstPlugin: reset m_inputs and m_outputs in updateInOutCount() Reset m_inputs and m_outputs to NULL after deleting the memory they're pointing to. Fixes possible crash if new input or output count is 0 and the count changes again later. Signed-off-by: Tobias Doerffel --- plugins/vst_base/remote_vst_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/vst_base/remote_vst_plugin.cpp b/plugins/vst_base/remote_vst_plugin.cpp index a638ed692..3ae58bfce 100644 --- a/plugins/vst_base/remote_vst_plugin.cpp +++ b/plugins/vst_base/remote_vst_plugin.cpp @@ -885,6 +885,9 @@ void RemoteVstPlugin::updateInOutCount() delete[] m_inputs; delete[] m_outputs; + m_inputs = NULL; + m_outputs = NULL; + setInputCount( inputCount() ); setOutputCount( outputCount() );