summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-21 16:45:05 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-21 19:31:30 +0200
commit99e4145c5f842bc8416719258089f9bdb696602e (patch)
treed289da56ca950d1733e5ec5c30652c3cd27ebb75
parentb9d06c893df399e16572381d086db42be12186eb (diff)
tdf#120703 (PVS): redundant nullptr check
V668 There is no sense in testing the 'pResult' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: I8c80df7100e6cdf6c3c51957e3bef3c8a9f30732 Reviewed-on: https://gerrit.libreoffice.org/62137 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index feca2cee49a1..5471e62c6602 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -215,8 +215,7 @@ std::shared_ptr<BitmapCache> PageCacheManager::GetCache (
Recycle(pResult, pDocument,rPreviewSize);
// Put the new (or old) cache into the container.
- if (pResult != nullptr)
- mpPageCaches->emplace(aKey, pResult);
+ mpPageCaches->emplace(aKey, pResult);
return pResult;
}