summaryrefslogtreecommitdiffstats
path: root/source/cPluginManager.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-22 16:22:21 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-22 16:22:21 +0200
commit7c84349990f21f783f4b24c113fb372a3c00164b (patch)
tree41cb29e214b98fc5b9c105bdf722a5c236c2318e /source/cPluginManager.cpp
parentFixed cWebPlugin_Lua being not thread safe. And I don't know why, but it still crashes in Lua sometimes o_O (diff)
downloadcuberite-7c84349990f21f783f4b24c113fb372a3c00164b.tar
cuberite-7c84349990f21f783f4b24c113fb372a3c00164b.tar.gz
cuberite-7c84349990f21f783f4b24c113fb372a3c00164b.tar.bz2
cuberite-7c84349990f21f783f4b24c113fb372a3c00164b.tar.lz
cuberite-7c84349990f21f783f4b24c113fb372a3c00164b.tar.xz
cuberite-7c84349990f21f783f4b24c113fb372a3c00164b.tar.zst
cuberite-7c84349990f21f783f4b24c113fb372a3c00164b.zip
Diffstat (limited to '')
-rw-r--r--source/cPluginManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp
index ec75a2e11..041180818 100644
--- a/source/cPluginManager.cpp
+++ b/source/cPluginManager.cpp
@@ -623,11 +623,11 @@ bool cPluginManager::CallHookUpdatedSign(cWorld * a_World, int a_BlockX, int a_B
-cPlugin* cPluginManager::GetPlugin( const char* a_Plugin ) const
+cPlugin* cPluginManager::GetPlugin( const AString & a_Plugin ) const
{
for( PluginList::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr )
{
- if (strcmp((*itr)->GetName(), a_Plugin) == 0 )
+ if ((*itr)->GetName().compare(a_Plugin) == 0)
{
return *itr;
}
@@ -657,8 +657,6 @@ void cPluginManager::UnloadPluginsNow()
cPlugin_Lua* LuaPlugin = *m_LuaPlugins.begin();
if( LuaPlugin )
{
- cWebAdmin* WebAdmin = cRoot::Get()->GetWebAdmin();
- if( WebAdmin ) WebAdmin->RemovePlugin( LuaPlugin->GetLuaState() );
delete LuaPlugin;
}
m_LuaPlugins.remove( LuaPlugin );