diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-07-19 18:18:13 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-07-19 18:18:13 +0000 |
commit | c9a9db42fc216d6106e09def83a295c77ce080ab (patch) | |
tree | b8d15482c11190cc0a8ce89cbcd0b7d3ef8d8bd4 /plugins/Clist_modern/src/modern_clcitems.cpp | |
parent | 5592c77cdc47f100bc705a2a51a27c737ef78b97 (diff) |
clist_modern crashfix
git-svn-id: http://svn.miranda-ng.org/main/trunk@1048 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcitems.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcitems.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index d1acc918fa..2325cef988 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -758,9 +758,11 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc BOOL fEmbedded = dat->force_in_dialog;
// always hide subcontacts (but show them on embedded contact lists)
- if (dat->filterSearch && dat->szQuickSearch) {
+ if (dat->filterSearch && dat->szQuickSearch && pdnce->tszName) {
// search filtering
- return _tcsstr(CharLowerW(pdnce->tszName), CharLowerW(dat->szQuickSearch)) ? 0 : 1;
+ TCHAR *lowered_name = CharLowerW(NEWTSTR_ALLOCA(pdnce->tszName));
+ TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch));
+ return _tcsstr(lowered_name, lowered_search) ? 0 : 1;
}
if (g_CluiData.bMetaAvail && dat != NULL && dat->IsMetaContactsEnabled && g_szMetaModuleName && db_get_b(hContact, g_szMetaModuleName, "IsSubcontact", 0))
return -1; //subcontact
|