diff options
author | George Hazan <ghazan@miranda.im> | 2020-07-13 19:55:55 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-07-13 19:55:55 +0300 |
commit | e2317d13f1c3011d7ae29d3913645235eb301703 (patch) | |
tree | 123eef955bad6edd7945822c4b12faef1e0efd34 | |
parent | 00447203dc3c08aa79bdbb7521342ced5092c7f3 (diff) |
fix for very rare crash in clist_modern
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/clistmod.cpp | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 4af2ec939d..24051ebebf 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -403,7 +403,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData mir_snprintf(szTemp, "%s|", szProto);
filterResult = strstr(cfg::dat.protoFilter, szTemp) ? 1 : 0;
}
-
+
if (cfg::dat.bFilterEffective & CLVM_FILTER_GROUPS) {
ptrW tszGroup(Clist_GetGroup(hContact));
if (tszGroup != NULL) {
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 00054758b2..0c5708fe4e 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -390,6 +390,9 @@ int CMimAPI::DispatchNewEvent(WPARAM hContact, LPARAM hDbEvent) int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) { + if (hContact == 0) + return 0; + DBEVENTINFO dbei = {}; db_event_get(hDbEvent, &dbei); diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index fdf0b99dc9..6fcb13671e 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -348,6 +348,9 @@ int fnShowHide() MIR_APP_DLL(void) Clist_ChangeContactIcon(MCONTACT hContact, int iIcon)
{
+ if (hContact == 0)
+ return;
+
Clist_BroadcastAsync(INTM_ICONCHANGED, hContact, iIcon);
NotifyEventHooks(hContactIconChangedEvent, hContact, iIcon);
|