# HG changeset patch # User cannam # Date 1250516575 0 # Node ID 9abf7455a1a304e1b31b2ee32ec1c602abf14b9b # Parent 1ed95908a39703aaa0ffd8a0ab674cbef8a042d5 * Fix crash when an adapter's createPlugin() fails in getDescriptor() diff -r 1ed95908a397 -r 9abf7455a1a3 src/vamp-sdk/PluginAdapter.cpp --- a/src/vamp-sdk/PluginAdapter.cpp Mon Jun 15 14:30:05 2009 +0000 +++ b/src/vamp-sdk/PluginAdapter.cpp Mon Aug 17 13:42:55 2009 +0000 @@ -168,6 +168,11 @@ if (m_populated) return &m_descriptor; Plugin *plugin = m_base->createPlugin(48000); + + if (!plugin) { + std::cerr << "PluginAdapterBase::Impl::getDescriptor: Failed to create plugin" << std::endl; + return 0; + } if (plugin->getVampApiVersion() != VAMP_API_VERSION) { std::cerr << "Vamp::PluginAdapterBase::Impl::getDescriptor: ERROR: "