Index: src/plugin/PluginClass.cpp |
=================================================================== |
--- a/src/plugin/PluginClass.cpp |
+++ b/src/plugin/PluginClass.cpp |
@@ -259,11 +259,8 @@ |
s_criticalSectionLocal.Lock(); |
{ |
- if (settings->GetPluginEnabled()) |
- { |
- s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance(); |
- } |
- |
+ // Always register on startup, then check if we need to unregister in a separate thread |
+ s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance(); |
s_asyncWebBrowser2 = unknownSite; |
s_instances.Add(this); |
} |
@@ -732,9 +729,14 @@ |
bool CPluginClass::InitObject(bool bBHO) |
{ |
+ CPluginSettings* settings = CPluginSettings::GetInstance(); |
+ |
+ if (!settings->GetPluginEnabled()) |
+ { |
+ s_mimeFilter->Unregister(); |
+ } |
+ |
// Load theme module |
- |
- |
s_criticalSectionLocal.Lock(); |
{ |
if (!s_hUxtheme) |
@@ -818,8 +820,6 @@ |
} |
} |
- |
- CPluginSettings* settings = CPluginSettings::GetInstance(); |
return true; |
} |