sw/source/core/unocore/unoframe.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ff6a1a9e41914c4a9dfd00f986342277f9c669df
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 30 16:46:18 2022 +0100
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Fri Sep 2 11:44:59 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 <er...@redhat.com>

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 )

Reply via email to