summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-30 16:46:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-30 21:12:52 +0200
commit4343432d423b5d92ca2b4ff5037eb29c8ac080ff (patch)
tree476c9434f0930e96359371c9d1f1546425db733b /sw
parent8ca13426ca50a9466f552ac1e2f062920003d5ea (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unoframe.cxx5
1 files changed, 3 insertions, 2 deletions
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 )