Kaydet (Commit) 6be4694a authored tarafından Mike Kaganski's avatar Mike Kaganski

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: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 51aada2a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment