diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-18 16:39:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-18 21:08:40 +0100 |
commit | efe91354ef0445c0b7261174d5dd701feba66715 (patch) | |
tree | 7897d08a439e323fe7656d63d1c05419283bc762 | |
parent | 42ed857640e7d506344713972e0cb6a971391a54 (diff) |
coverity#1371133 Dereference after null check
Change-Id: Ic3ba3e3a6f1ec945c83c5aeaf8b905be3ec49686
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 387ceb9ba88e..ca7e34774ac8 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2639,7 +2639,8 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, { rSh.MakeDrawView(); FmFormView* pFmView = dynamic_cast<FmFormView*>( rSh.GetDrawView() ); - if(pFmView) { + if (pFmView && pDragPt) + { const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData); SdrObject* pObj = pFmView->CreateXFormsControl(rDesc); if(nullptr != pObj) @@ -2696,7 +2697,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, { rSh.MakeDrawView(); FmFormView* pFmView = dynamic_cast<FmFormView*>( rSh.GetDrawView() ); - if (pFmView && bHaveColumnDescriptor) + if (pFmView && bHaveColumnDescriptor && pDragPt) { SdrObject* pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) ); if ( nullptr != pObj) |