}
if (plugin_compare_flag)
{
- //Auto plugin detection is disabled
- /*
- try
- {
- boost::thread *t = new boost::thread(boost::bind(&CpluffAdapter::observePluginPath,
- //this, (void *)path.c_str()));
- this, (void *)m_cp_plugins[i]->plugin_path));
- m_thread_g.add_thread(t);
- }
- catch (...)
- {
- printf("thread throw exception\n");
- }
- */
m_plugins.push_back(*plugin);
delete(plugin);
}
for (unsigned int i = 0; i < m_plugins.size(); i++)
{
- if (!m_plugins[i].getValueByAttribute(key).compare(value))
+ std::string attributeValue = m_plugins[i].getValueByAttribute(key);
+ if (!attributeValue.empty() && !attributeValue.compare(value))
{
re_plugins->push_back(m_plugins[i]);
}