diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 21:11:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 21:25:18 +0100 |
commit | c8bb0b241674f6eb834711e8ac18cd5fb6bc5c7f (patch) | |
tree | d2589b54ad6ba586a870aa826780f378266a92d2 /sd | |
parent | 67fa2dc017695850f7230d0204621a863676d1f2 (diff) |
coverity#704748 Dereference after null check
Change-Id: I88552b40658df85bbfbf0848e94085aa8eb649b6
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fucopy.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index a93d7ded0d6f..e237f82e21f4 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -134,30 +134,30 @@ void FuCopy::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pPoolItem = NULL; // Count - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) nNumber = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue(); // translation - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) lSizeX = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) lSizeY = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) lAngle = ( ( const SfxInt32Item* )pPoolItem )->GetValue(); // scale - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) lWidth = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) lHeight = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); // start/end color - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { aStartColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); bColor = true; } - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) { aEndColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); if( aStartColor == aEndColor ) |