diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-10 23:08:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-10 23:08:52 +0300 |
commit | 3f2515626d724fb748535020085e1822db113013 (patch) | |
tree | 8e90f8a548aff3aaf2a0015d3f2e61ec42e0c52f /src | |
parent | 60058a8cdad93ccf5a98e2ec3914a9a02525711d (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.cpp | 10 |
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];
|