diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 9fce02b65..cb4568a05 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -163,9 +163,9 @@ void PluginManager::loadPluginsDir(const QDir& dir) qWarning() << "PluginManager::loadPluginsDir: " << qPrintable(loader->errorString()); } - if (plugin) + if (plugin != 0) { - m_plugins.append(Plugin(fileName, plugin)); + m_plugins.append(Plugin(fileName, loader, plugin)); } else { diff --git a/sdrbase/plugin/pluginmanager.h b/sdrbase/plugin/pluginmanager.h index c2f71b797..8c41172e5 100644 --- a/sdrbase/plugin/pluginmanager.h +++ b/sdrbase/plugin/pluginmanager.h @@ -42,10 +42,12 @@ public: struct Plugin { QString filename; + QPluginLoader* loader; PluginInterface* pluginInterface; - Plugin(const QString& _filename, PluginInterface* _plugin) : + Plugin(const QString& _filename, QPluginLoader* pluginLoader, PluginInterface* _plugin) : filename(_filename), + loader(pluginLoader), pluginInterface(_plugin) { } };