diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 15:50:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 20:25:57 +0200 |
commit | 5464a1dad69c52d011b194baf7d543ce8dd27748 (patch) | |
tree | 273c4fe7995686ac80df6f5864231b578245fc1c /sw | |
parent | c0d3b50213ffbed1cd58226a35e325fb7c769ec0 (diff) |
Resolves: tdf#152619 crash inspecting uninserted XFieldMaster
Change-Id: I765dd5d7e1ed2c1749841491a50216a6afe903c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150351
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 03761b0f28b3..019da24f7241 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1297,6 +1297,8 @@ SwXTextField::getTextFieldMaster() SolarMutexGuard aGuard; SwFieldType* pType = m_pImpl->GetFieldType(); + if (!pType && !m_pImpl->m_pDoc) // tdf#152619 + return nullptr; uno::Reference<beans::XPropertySet> const xRet( SwXFieldMaster::CreateXFieldMaster(m_pImpl->m_pDoc, pType)); return xRet; |