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

New commits:
commit 4343432d423b5d92ca2b4ff5037eb29c8ac080ff
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 30 16:46:18 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Aug 30 21:12:52 2022 +0200

    crash inserting odt as embedded ole object
    
    Change-Id: I6bf8e2913fc677efe9904507ef8e4edddb9ef3ff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139058
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 1be52ee6113a..fd28f3bd2424 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2262,8 +2262,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