summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-10 23:08:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-10 23:08:52 +0300
commit3f2515626d724fb748535020085e1822db113013 (patch)
tree8e90f8a548aff3aaf2a0015d3f2e61ec42e0c52f /src
parent60058a8cdad93ccf5a98e2ec3914a9a02525711d (diff)
merge from #1093: we don't check null pointers and missing subs
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/clistsettings.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index f50d0ba4f4..3413fdc5f0 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -76,10 +76,12 @@ ClcCacheEntry* fnGetCacheEntry(MCONTACT hContact)
ClcCacheEntry *p;
int idx = clistCache.getIndex((ClcCacheEntry*)&hContact);
if (idx == -1) {
- if ((p = cli.pfnCreateCacheItem(hContact)) != nullptr) {
- clistCache.insert(p);
- cli.pfnInvalidateDisplayNameCacheEntry(hContact);
- }
+ p = cli.pfnCreateCacheItem(hContact);
+ if (p == nullptr)
+ return nullptr;
+
+ clistCache.insert(p);
+ cli.pfnInvalidateDisplayNameCacheEntry(hContact);
}
else p = clistCache[idx];