summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-06-07 17:47:15 +0200
committerMichael Stahl <mstahl@redhat.com>2017-06-07 17:49:39 +0200
commit28d760e5220a175a5eb8e859498baa4c7f97f3e2 (patch)
treed890eed3545a87e3530d60652610f868ac8c0517
parentf9b665d9694a8e328379c1b0b4a714edddf4285a (diff)
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
-rw-r--r--sw/source/uibase/shells/frmsh.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 11cb198d88e2..9a75265c5065 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -350,13 +350,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;