diff options
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];
|