summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-03 22:03:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-03 22:03:44 +0300
commit2eb61207710614d8181aca54abf7ecab58e04ba5 (patch)
tree7ae808cbc574b96a6ee1bd6a6f5003280c44f18f
parent40ea120ddb5ab1ccedd8df0df8d21fa98e036cb8 (diff)
fix for crash when active MRA account is present in your profile
-rw-r--r--src/mir_app/src/CMPluginBase.cpp3
-rw-r--r--src/mir_app/src/newplugins.cpp2
-rw-r--r--src/mir_app/src/plugins.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index 2875c00fe1..b9ed701554 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -274,6 +274,9 @@ void CMPluginBase::debugLogW(LPCWSTR wszFormat, ...)
void CMPluginBase::RegisterProtocol(int type, pfnInitProto fnInit, pfnUninitProto fnUninit)
{
+ if (isPluginBanned(m_pInfo.uuid))
+ return;
+
if (type == PROTOTYPE_PROTOCOL && fnInit != nullptr)
type = PROTOTYPE_PROTOWITHACCS;
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp
index 57e55df16d..234ec3e4f2 100644
--- a/src/mir_app/src/newplugins.cpp
+++ b/src/mir_app/src/newplugins.cpp
@@ -114,7 +114,7 @@ static const MUUID pluginBannedList[] =
{ 0xe7c48bab, 0x8ace, 0x4cb3, { 0x84, 0x46, 0xd4, 0xb7, 0x34, 0x81, 0xf4, 0x97 } }, // mra
};
-static bool isPluginBanned(const MUUID &u1)
+bool isPluginBanned(const MUUID &u1)
{
for (auto &it : pluginBannedList)
if (it == u1)
diff --git a/src/mir_app/src/plugins.h b/src/mir_app/src/plugins.h
index ff0764fd2f..f46b3fa056 100644
--- a/src/mir_app/src/plugins.h
+++ b/src/mir_app/src/plugins.h
@@ -66,6 +66,7 @@ void SetPluginOnWhiteList(const wchar_t *pluginname, int allow);
int getDefaultPluginIdx(const MUUID &muuid);
bool hasMuuid(const MUUID *pFirst, const MUUID&);
+bool isPluginBanned(const MUUID &u1);
pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path);