sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 99e4145c5f842bc8416719258089f9bdb696602e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Oct 21 16:45:05 2018 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Oct 21 19:31:30 2018 +0200

    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.kagan...@collabora.com>

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;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to