[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source

Michael Stahl mstahl at redhat.com
Fri Jun 9 19:57:15 UTC 2017


 sw/source/uibase/shells/frmsh.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e64a85d50dbd4db7a3de1ee2f6caf52cc60f6a50
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jun 7 17:47:15 2017 +0200

    tdf#108305 sw: fix crash on fly "Position and Size"
    
    Everything else in SwFrameShell::Execute() checks pArgs isn't null so do
    the same here.
    
    (regression from d02f75a8c36705924ddd6a5921fe3012fafce812)
    
    Change-Id: I73d85b111a5d2c088b9d888b8595ceb3979e8d2b
    (cherry picked from commit 28d760e5220a175a5eb8e859498baa4c7f97f3e2)
    Reviewed-on: https://gerrit.libreoffice.org/38521
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 2a6ad96916c8..a70097dcc0b3 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -351,13 +351,15 @@ void SwFrameShell::Execute(SfxRequest &rReq)
             bool bApplyNewSize = false;
 
             Size aNewSize = aMgr.GetSize();
-            if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, false, &pItem ) )
+            if (pArgs &&
+                SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_WIDTH, false, &pItem))
             {
                 aNewSize.setWidth( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
                 bApplyNewSize = true;
             }
 
-            if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, false, &pItem ) )
+            if (pArgs &&
+                SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_HEIGHT, false, &pItem))
             {
                 aNewSize.setHeight( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
                 bApplyNewSize = true;


More information about the Libreoffice-commits mailing list