diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-19 16:20:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-19 16:20:58 +0300 |
commit | bc6680e6111154c7afc1fd602fdfe456b5a5bbe0 (patch) | |
tree | 13634d69f53cf1bd3e8fff11bc8864472b7b6661 /src | |
parent | 653fe3198fbeef168b9d579da8d95ddf73dbb4c8 (diff) |
StdMsg: if no popup plugin installed, chat options might crash
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index a5f0428519..45880e5bfc 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -215,7 +215,7 @@ static void InitSetting(wchar_t** ppPointer, char* pszSetting, wchar_t* pszDefau class COptMainDlg : public CDlgBase { - HTREEITEM hListHeading1, hListHeading2, hListHeading3, hListHeading4, hListHeading5, hListHeading6; + HTREEITEM hListHeading1, hListHeading2, hListHeading3, hListHeading4, hListHeading5, hListHeading6 = 0; CCtrlTreeView checkBoxes; @@ -330,7 +330,8 @@ class COptMainDlg : public CDlgBase CheckHeading(hListHeading3); CheckHeading(hListHeading4); CheckHeading(hListHeading5); - CheckHeading(hListHeading6); + if (PopupInstalled) + CheckHeading(hListHeading6); } public: @@ -350,15 +351,17 @@ public: hListHeading3 = InsertBranch(LPGEN("Default events to show in new chat rooms if the 'event filter' is enabled"), db_get_b(0, CHAT_MODULE, "Branch3Exp", 0) ? TRUE : FALSE); hListHeading4 = InsertBranch(LPGEN("Icons to display in the message log"), db_get_b(0, CHAT_MODULE, "Branch4Exp", 0) ? TRUE : FALSE); hListHeading5 = InsertBranch(LPGEN("Icons to display in the tray"), db_get_b(0, CHAT_MODULE, "Branch5Exp", 0) ? TRUE : FALSE); - if (PopupInstalled) - hListHeading6 = InsertBranch(LPGEN("Popups to display"), db_get_b(0, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); FillBranch(hListHeading1, branch1, _countof(branch1), 0); FillBranch(hListHeading2, branch2, _countof(branch2), 0); FillBranch(hListHeading3, branch3, _countof(branch3), 0x03E0); FillBranch(hListHeading4, branch4, _countof(branch4), 0x0000); FillBranch(hListHeading5, branch5, _countof(branch5), 0x1000); - FillBranch(hListHeading6, branch6, _countof(branch6), 0x0000); + + if (PopupInstalled) { + hListHeading6 = InsertBranch(LPGEN("Popups to display"), db_get_b(0, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); + FillBranch(hListHeading6, branch6, _countof(branch6), 0x0000); + } FixHeadings(); } |