Mercurial > hg > svcore
comparison plugin/DSSIPluginInstance.cpp @ 979:c598b1d880f2
Fix potential null pointer deref
author | Chris Cannam |
---|---|
date | Wed, 03 Sep 2014 13:10:19 +0100 |
parents | 7aa9088e9bcd |
children | cc27f35aa75c |
comparison
equal
deleted
inserted
replaced
978:9f526ddc6165 | 979:c598b1d880f2 |
---|---|
1007 } | 1007 } |
1008 | 1008 |
1009 if (!m_descriptor || !m_descriptor->run_synth) { | 1009 if (!m_descriptor || !m_descriptor->run_synth) { |
1010 m_eventBuffer.skip(m_eventBuffer.getReadSpace()); | 1010 m_eventBuffer.skip(m_eventBuffer.getReadSpace()); |
1011 m_haveLastEventSendTime = false; | 1011 m_haveLastEventSendTime = false; |
1012 if (m_descriptor->LADSPA_Plugin->run) { | 1012 if (m_descriptor && m_descriptor->LADSPA_Plugin->run) { |
1013 m_descriptor->LADSPA_Plugin->run(m_instanceHandle, count); | 1013 m_descriptor->LADSPA_Plugin->run(m_instanceHandle, count); |
1014 } else { | 1014 } else { |
1015 for (size_t ch = 0; ch < m_audioPortsOut.size(); ++ch) { | 1015 for (size_t ch = 0; ch < m_audioPortsOut.size(); ++ch) { |
1016 memset(m_outputBuffers[ch], 0, m_blockSize * sizeof(sample_t)); | 1016 memset(m_outputBuffers[ch], 0, m_blockSize * sizeof(sample_t)); |
1017 } | 1017 } |