diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 15:50:25 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-04-17 13:03:08 +0200 |
commit | d9cf8459ef49f3011de3003538b503d0be06dc17 (patch) | |
tree | 51a5c760a576d465f5c429ba673cdf093f7abbc1 | |
parent | aaa077ccf4600f582cd33b7510f0d911bf5845d6 (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>
(cherry picked from commit 5464a1dad69c52d011b194baf7d543ce8dd27748)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150321
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 71c7c3dddb1291e262b1f8132b75e95fc6f9fa02)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150333
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-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 abe754f62b4f..e6320e9d248b 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1325,6 +1325,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; |