[Libreoffice-commits] core.git: sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 17:31:52 UTC 2018


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

New commits:
commit 99e4145c5f842bc8416719258089f9bdb696602e
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 21 16:45:05 2018 +0200
Commit:     Mike Kaganski <mike.kaganski at 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.kaganski at 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;
 }


More information about the Libreoffice-commits mailing list