mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-06 18:08:31 +00:00
Prevent double plugin unload on `meta retry`
This commit is contained in:
parent
ccce734e12
commit
4b776a91ed
@ -320,8 +320,9 @@ bool CPluginManager::Retry(PluginId id, char *error, size_t len)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//don't really care about the buffer here
|
//We don't need to handle any extra unloading,
|
||||||
_Unload(pl, true, buffer, sizeof(buffer)-1);
|
//as if plugin has failed to load it would be
|
||||||
|
//unloaded by _Load() method itself
|
||||||
|
|
||||||
//We just wasted an id... reclaim it
|
//We just wasted an id... reclaim it
|
||||||
m_LastId--;
|
m_LastId--;
|
||||||
@ -400,7 +401,8 @@ struct Unloader : public SourceHook::Impl::UnloadListener
|
|||||||
if (plugin_->m_UnloadFn != NULL)
|
if (plugin_->m_UnloadFn != NULL)
|
||||||
plugin_->m_UnloadFn();
|
plugin_->m_UnloadFn();
|
||||||
|
|
||||||
dlclose(plugin_->m_Lib);
|
if(plugin_->m_Lib)
|
||||||
|
dlclose(plugin_->m_Lib);
|
||||||
|
|
||||||
if (destroy_)
|
if (destroy_)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user