diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-28 13:26:21 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-28 16:02:44 +0200 |
commit | 6be4694ab84217d195091d2b9a0e7c74199f5fc1 (patch) | |
tree | 01755ce3c5a285807cc7655506cd435744780aed | |
parent | 51aada2a6f2cacf0134e14bd6559bc71c746c4a5 (diff) |
tdf#120703 PVS: nullptr dereference
V595 The 'pContact' pointer was utilized before it was verified against nullptr.
Check lines: 1254, 1256.
Change-Id: I5d3d28b3c8a70924f329fde9f020f42d9eb5e9a1
Reviewed-on: https://gerrit.libreoffice.org/71459
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index ec866b0c4e83..cad5209f32a2 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1253,10 +1253,10 @@ SwFlyFrameFormat* SwDoc::InsertDrawLabel( { SwDrawContact *const pContact = static_cast<SwDrawContact*>(GetUserCall( &rSdrObj )); - OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFormat()->Which(), - "InsertDrawLabel(): not a DrawFrameFormat" ); if (!pContact) return nullptr; + OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFormat()->Which(), + "InsertDrawLabel(): not a DrawFrameFormat" ); SwDrawFrameFormat* pOldFormat = static_cast<SwDrawFrameFormat *>(pContact->GetFormat()); if (!pOldFormat) |