summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-25 20:43:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-25 20:43:51 +0300
commite19a213605f1974c2000a9f2b1b7d6d4666cdb90 (patch)
tree0c5b0cd3ce239e9ac964ab765a592bdf35a42172 /src/core
parentb7656780ce149ba23304ae1f6f292fc5a5197a1b (diff)
duplicate cache item removed to avoid rare crashes
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdclist/src/clc.h3
-rw-r--r--src/core/stdclist/src/contact.cpp8
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/stdclist/src/clc.h b/src/core/stdclist/src/clc.h
index 67a0ad228c..3ed5186534 100644
--- a/src/core/stdclist/src/clc.h
+++ b/src/core/stdclist/src/clc.h
@@ -28,6 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int CompareContacts(const ClcContact *contact1, const ClcContact *contact2);
+struct ClcCacheEntry : public ClcCacheEntryBase
+{};
+
struct ClcContact : public ClcContactBase
{
};
diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp
index 95a5e2212a..853a5b140b 100644
--- a/src/core/stdclist/src/contact.cpp
+++ b/src/core/stdclist/src/contact.cpp
@@ -58,8 +58,8 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2)
MCONTACT a = c1->hContact, b = c2->hContact;
wchar_t namea[128], *nameb;
- int statusa = db_get_w(a, c1->proto, "Status", ID_STATUS_OFFLINE);
- int statusb = db_get_w(b, c2->proto, "Status", ID_STATUS_OFFLINE);
+ int statusa = db_get_w(a, c1->pce->szProto, "Status", ID_STATUS_OFFLINE);
+ int statusb = db_get_w(b, c2->pce->szProto, "Status", ID_STATUS_OFFLINE);
if (g_bSortByProto) {
/* deal with statuses, online contacts have to go above offline */
@@ -67,8 +67,8 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2)
return 2 * (statusa == ID_STATUS_OFFLINE) - 1;
}
/* both are online, now check protocols */
- if (c1->proto != nullptr && c2->proto != nullptr) {
- int rc = mir_strcmp(c1->proto, c2->proto);
+ if (c1->pce->szProto != nullptr && c2->pce->szProto != nullptr) {
+ int rc = mir_strcmp(c1->pce->szProto, c2->pce->szProto);
if (rc != 0)
return rc;
}