sd/source/ui/sidebar/SlideBackground.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 38936ae9ab79fc6d46ef91695034cdeec1cc6486 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Mon Jul 10 13:30:38 2017 +0200 sd: fix unitialized "pItem" pointer in SlideBackground::SlideBackground /sd/source/ui/sidebar/SlideBackground.cxx:176:17: runtime error: downcast of misaligned address 0x00009cf8cd67 for type 'const SvxSizeItem', which requires 8 byte alignment (regression from fba28df77d7e98663d1cf77ac206f8799fce4108) Change-Id: I822efe57f35c851b6f63e1e5489ab2448a19963d Reviewed-on: https://gerrit.libreoffice.org/39753 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 2c881f2a4acb..5011f7a58c01 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -168,13 +168,15 @@ SlideBackground::SlideBackground( get(m_pTopMarginEdit, "top"); get(m_pBottomMarginEdit, "bottom"); - const SfxPoolItem* pItem; - const SvxSizeItem* pSize = nullptr; if ( SfxViewFrame::Current() ) { + const SfxPoolItem* pItem = nullptr; SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState( SID_ATTR_PAGE_SIZE, pItem ); - pSize = static_cast<const SvxSizeItem*>( pItem ); - m_aPageSize = pSize->GetSize(); + if (pItem) + { + const SvxSizeItem* pSize = static_cast<const SvxSizeItem*>( pItem ); + m_aPageSize = pSize->GetSize(); + } } SetFieldUnit( *m_pTopMarginEdit, meFieldUnit ); SetFieldUnit( *m_pBottomMarginEdit, meFieldUnit ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits