diff options
Diffstat (limited to 'src/modules/plugins/newplugins.cpp')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 7e4e9ac80c..24a4881521 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -333,12 +333,16 @@ int Plugin_UnloadDyn(pluginEntry* p) }
// release default plugin
- if ( !(p->pclass & PCLASS_CORE))
+ bool bCore = (p->pclass & PCLASS_CORE) != 0;
+ Plugin_Uninit(p);
+
+ if ( !bCore )
for (int i=0; i < SIZEOF(pluginDefault); i++)
- if (pluginDefault[i].pImpl == p)
+ if (pluginDefault[i].pImpl == p) {
+ pluginDefault[i].pImpl = NULL;
LoadCorePlugin( pluginDefault[i] );
+ }
- Plugin_Uninit(p);
return TRUE;
}
|