diff options
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index f951f6221..406a540f4 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1459,11 +1459,16 @@ cPluginManager::CommandResult cPluginManager::HandleCommand(cPlayer & a_Player, -cPlugin * cPluginManager::GetPlugin( const AString & a_Plugin) const +cPlugin * cPluginManager::GetPlugin(const AString & a_Plugin) const { for (PluginMap::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr) { - if (itr->second == nullptr) continue; + if (itr->second == nullptr) + { + // The plugin is currently unloaded + continue; + } + if (itr->second->GetName().compare(a_Plugin) == 0) { return itr->second; |