sw/source/core/unocore/unoframe.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 524a56fb1aa682a0907a925865340730da523636 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Aug 30 16:46:18 2022 +0100 Commit: Christian Lohmaier <[email protected]> CommitDate: Fri Sep 9 15:29:45 2022 +0200 crash inserting odt as embedded ole object Change-Id: I6bf8e2913fc677efe9904507ef8e4edddb9ef3ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138982 Tested-by: Jenkins Reviewed-by: Eike Rathke <[email protected]> (cherry picked from commit ff6a1a9e41914c4a9dfd00f986342277f9c669df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139414 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index ba005ac284cf..ac51043ff058 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2263,8 +2263,9 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) } else if(WID_LAYOUT_SIZE == pEntry->nWID) { - // format document completely in order to get correct value - pFormat->GetDoc()->GetEditShell()->CalcLayout(); + // format document completely in order to get correct value (no EditShell for ole embedded case) + if (SwEditShell* pEditShell = pFormat->GetDoc()->GetEditShell()) + pEditShell->CalcLayout(); SwFrame* pTmpFrame = SwIterator<SwFrame,SwFormat>( *pFormat ).First(); if ( pTmpFrame )
