summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-21 14:04:18 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-21 15:47:56 +0200
commit63e85b852b9507f7a034b930a20678ee88c2fd0b (patch)
tree47f9d1761e2909122be82f55b1b6388dada54124
parent630f506ff2e505b093ab54a5d4394adcd7dd0be2 (diff)
tdf#120703 (PVS): redundant nullptr check
V668 There is no sense in testing the 'pCGM' 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: Ib07d1ceaf01f657e67572c0f5bcd6aae497d2d07 Reviewed-on: https://gerrit.libreoffice.org/62132 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--filter/source/graphicfilter/icgm/cgm.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index e1d686c5e8c3..ba775e98fed8 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -695,7 +695,7 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u
try
{
std::unique_ptr<CGM> pCGM(new CGM(rXModel));
- if (pCGM && pCGM->IsValid())
+ if (pCGM->IsValid())
{
rIn.SetEndian(SvStreamEndian::BIG);
sal_uInt64 const nInSize = rIn.remainingSize();