diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/newplugins.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 12918f3426..9f91136a80 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -421,8 +421,14 @@ pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path) MIR_APP_DLL(void) SetPluginOnWhiteList(const char* szPluginName, bool bAllow)
{
- if (szPluginName != nullptr)
- db_set_b(0, PLUGINDISABLELIST, CPluginName(szPluginName).c_str(), !bAllow);
+ if (szPluginName == nullptr)
+ return;
+
+ CPluginName tmp(szPluginName);
+ if (bAllow)
+ db_unset(0, PLUGINDISABLELIST, tmp);
+ else
+ db_set_b(0, PLUGINDISABLELIST, tmp, 1);
}
// returns 1 if the plugin should be enabled within this profile, filename is always lower case
|