diff 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
line wrap: on
line diff
--- a/plugin/DSSIPluginInstance.cpp	Wed Sep 03 13:08:32 2014 +0100
+++ b/plugin/DSSIPluginInstance.cpp	Wed Sep 03 13:10:19 2014 +0100
@@ -1009,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) {