diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-16 09:34:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-17 00:38:09 +0200 |
commit | 833e4d059aae5f3a66c70f9f3d8dc1ab4c931322 (patch) | |
tree | 48fc5f18b53c0264db7efe4399fd84d8b85c521c /sw | |
parent | 8faf62c76ab3a89fb149f9ec127cb352f081fcf9 (diff) |
cid#1509262 Explicit null dereferenced
Change-Id: I65eab19b3b40fae6f6b88e4dd3cf21934dd3fd95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138373
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/sidebar/PageMarginControl.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index 632e94140e4f..f6e0caa727bc 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -204,8 +204,11 @@ PageMarginControl::PageMarginControl(PageMarginPopup* pControl, weld::Widget* pP SetMetricValue( *m_xBottomMarginEdit, m_nPageBottomMargin, m_eUnit ); SetFieldUnit( *m_xBottomMarginEdit, lcl_GetFieldUnit() ); - m_aPageSize = pSize->GetSize(); - SetMetricFieldMaxValues( m_aPageSize ); + if (pSize) + { + m_aPageSize = pSize->GetSize(); + SetMetricFieldMaxValues( m_aPageSize ); + } if ( m_bMirrored ) { |