Mercurial > hg > svcore
diff plugin/DSSIPluginInstance.cpp @ 980:6e6da0636e5e tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 16:36:21 +0100 |
parents | c598b1d880f2 |
children | cc27f35aa75c |
line wrap: on
line diff
--- a/plugin/DSSIPluginInstance.cpp Tue Sep 02 16:23:48 2014 +0100 +++ b/plugin/DSSIPluginInstance.cpp Tue Sep 09 16:36:21 2014 +0100 @@ -64,6 +64,7 @@ RealTimePluginInstance(factory, identifier), m_client(clientId), m_position(position), + m_instanceHandle(0), m_descriptor(descriptor), m_programCacheValid(false), m_eventBuffer(EVENT_BUFFER_SIZE), @@ -146,6 +147,7 @@ { ParameterList list; LADSPAPluginFactory *f = dynamic_cast<LADSPAPluginFactory *>(m_factory); + if (!f) return list; for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) { @@ -988,7 +990,7 @@ if (count == 0) count = m_blockSize; bool needLock = false; - if (m_descriptor->select_program) needLock = true; + if (m_descriptor && m_descriptor->select_program) needLock = true; if (needLock) { if (!m_processLock.tryLock()) { @@ -1007,7 +1009,7 @@ if (!m_descriptor || !m_descriptor->run_synth) { m_eventBuffer.skip(m_eventBuffer.getReadSpace()); m_haveLastEventSendTime = false; - if (m_descriptor->LADSPA_Plugin->run) { + if (m_descriptor && m_descriptor->LADSPA_Plugin->run) { m_descriptor->LADSPA_Plugin->run(m_instanceHandle, count); } else { for (size_t ch = 0; ch < m_audioPortsOut.size(); ++ch) {