sd/source/ui/func/fupage.cxx | 3 +++ sd/source/ui/func/futempl.cxx | 2 +- sd/source/ui/view/drviews1.cxx | 2 +- sd/source/ui/view/outlnvsh.cxx | 2 +- sd/source/ui/view/sdview2.cxx | 2 +- sfx2/source/control/bindings.cxx | 6 +++--- sfx2/source/dialog/dinfdlg.cxx | 12 ++++++++---- sfx2/source/menu/mnumgr.cxx | 9 +++++++-- 8 files changed, 25 insertions(+), 13 deletions(-)
New commits: commit 005976286b7b30905354d8b1b26fe3f84402d259 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 16:11:33 2014 +0100 coverity#704796 Dereference after null check Change-Id: I97aaaa38620f162a3a4d08bb66690815beb7880e diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 379905b7..51536b7 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -219,11 +219,16 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) } } - if ( !aCommand.isEmpty() ) + if (!aCommand.isEmpty() && pBindings) { pBindings->ExecuteCommand_Impl( aCommand ); + return sal_True; } - else if ( pBindings->IsBound(nId) ) + + if (!pBindings) + return sal_True; + + if ( pBindings->IsBound(nId) ) // normal function pBindings->Execute( nId ); else commit 53f03a3c83dd31c66c1577bba1bc03b47bf68d77 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 16:08:38 2014 +0100 coverity#704792 Dereference after null check Change-Id: Ie6f3174266dfa42a1eff81df45fc408656d4fbd9 diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3a19ff5..970379e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2101,10 +2101,14 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) } bModified = true; //!!! - if ( bModified ) - rSet.Put( *pInfo ); - if ( bMustDelete ) - delete pInfo; + + if (pInfo) + { + if ( bModified ) + rSet.Put( *pInfo ); + if ( bMustDelete ) + delete pInfo; + } return bModified; } commit 7096a32e16019e693c3f5806d706572ed7e6a970 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 16:06:43 2014 +0100 coverity#704791 Dereference after null check Change-Id: I7e973ac9b91ab112952f56ce290c07c9fc5670b2 diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 2331cc3..0523bbb 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -481,7 +481,7 @@ void SfxBindings::Update if ( bInternalUpdate ) { // Query Status - const SfxSlotServer* pMsgServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv); + const SfxSlotServer* pMsgServer = pDispatcher ? pCache->GetSlotServer(*pDispatcher, pImp->xProv) : NULL; if ( !pCache->IsControllerDirty() && ( !pMsgServer || !pMsgServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) ) ) commit ceebfc0436e878e1cf7e428f88567ec3cde2cc8b Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 16:05:47 2014 +0100 coverity#704790 Dereference after null check Change-Id: I276b404405b9717a03d43a24c6ffecd5c6553969 diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index d42be95..2331cc3 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1509,12 +1509,12 @@ void SfxBindings::UpdateControllers_Impl continue; } - if ( SFX_ITEM_DISABLED == eState || !pEnumItem->IsEnabled( pSlave->GetSlotId()) ) + if ( SFX_ITEM_DISABLED == eState || (pEnumItem && !pEnumItem->IsEnabled( pSlave->GetSlotId())) ) { // disabled pEnumCache->SetState(SFX_ITEM_DISABLED, 0); } - else if ( SFX_ITEM_AVAILABLE == eState ) + else if ( SFX_ITEM_AVAILABLE == eState && pEnumItem ) { // Determine enum value sal_uInt16 nValue = pEnumItem->GetEnumValue(); commit f36d55edf7cf2118184ff21db5f95291572b9d02 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 16:00:55 2014 +0100 coverity#704785 Dereference after null check Change-Id: I5ac5d5d693e8adfbeff4a60cf94c90f181986294 diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index c65f7cb..8300a24 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -198,7 +198,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent if( pSdrOleObj ) SvEmbedTransferHelper::FillTransferableObjectDescriptor( aObjDesc, pSdrOleObj->GetObjRef(), pSdrOleObj->GetGraphic(), pSdrOleObj->GetAspect() ); - else + else if (mpDocSh) mpDocSh->FillTransferableObjectDescriptor( aObjDesc ); aObjDesc.maSize = GetAllMarkedRect().GetSize(); commit 7f8f6291af814b5e2275b5b98b1221bd1fda571e Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 16:00:00 2014 +0100 coverity#704780 Dereference after null check Change-Id: I2c2e55ffa6a3c953bf679223a5361264bb384309 diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index b2ec1f9..c2a5fa7 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -633,7 +633,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) case SID_TRANSLITERATE_HIRAGANA: case SID_TRANSLITERATE_KATAGANA: { - OutlinerView* pOLV = pOlView->GetViewByWindow( GetActiveWindow() ); + OutlinerView* pOLV = pOlView ? pOlView->GetViewByWindow( GetActiveWindow() ) : 0; if( pOLV ) { using namespace ::com::sun::star::i18n; commit 4285773bdb5ab5aaaeafa4cbc23655020c0bc538 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 15:59:00 2014 +0100 coverity#704776 Dereference after null check Change-Id: I16a9cb07ebcadff31aed348c3380ffa9e859f9e4 diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 462992c..55c6fcc3 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -997,7 +997,7 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) /********************************************************************** * MASTERPAGE **********************************************************************/ - SdrPageView* pPageView = mpDrawView->GetSdrPageView(); + SdrPageView* pPageView = mpDrawView ? mpDrawView->GetSdrPageView() : NULL; if (pPageView) { commit a18dc050bc282a9aa086091f6b0848a3311c79be Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 15:56:21 2014 +0100 coverity#704759 Dereference after null check Change-Id: Id29fa14b8e7dd587c357c90f07b3858dcd931477 diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index c063428..289bb09 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -255,7 +255,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { if( !SD_MOD()->GetWaterCan() ) { - if( pArgs->GetItemState( nSId ) == SFX_ITEM_SET ) + if (pArgs && pArgs->GetItemState( nSId ) == SFX_ITEM_SET) { aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); SD_MOD()->SetWaterCan( sal_True ); commit 1fd45ad6ae41b22bd72aa24e2da1d8115cb4ea8b Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 8 15:52:44 2014 +0100 coverity#704753 Dereference after null check Change-Id: Id07ece047e9352bdd63408810662803be86cd4bc diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 9ed4ca4..6bfa2e3 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -165,6 +165,9 @@ void FuPage::Deactivate() const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) { + if (!mpDrawViewShell) + return NULL; + PageKind ePageKind = mpDrawViewShell->GetPageKind(); SfxItemSet aNewAttr(mpDoc->GetPool(),
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits