summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-06-21 19:03:36 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-06-26 11:51:56 +0200
commit7133af309a810d9caea0cd05cea4f784aac7456b (patch)
treeb4f9c221c570dfc6b6ea088ba1373cada1b62718
parent36b26c1ee6aff5b5101f45067736bd619fb56171 (diff)
tdf#125382: Check if pDoc is not null
regression from e18359445fabad9ba1a704600e9ee327112cc6ae Change-Id: Icd8db6a403b7736d6c8c9d40c8f2c7476c1eee87 Reviewed-on: https://gerrit.libreoffice.org/74533 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 36defda96fc62cef1e1ffb725f6768d54b0d9cd0) Reviewed-on: https://gerrit.libreoffice.org/74729
-rw-r--r--sw/source/core/unocore/unofield.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 7b6cd62b4801..8433440aa9ff 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1182,6 +1182,9 @@ public:
SwFieldType* GetFieldType() const
{
+ if(!m_pDoc)
+ throw uno::RuntimeException();
+
if (IsDescriptor())
return m_pFieldType;
return m_pFormatField->GetField()->GetTyp();
@@ -1363,6 +1366,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL
SwXTextField::getTextFieldMaster()
{
SolarMutexGuard aGuard;
+
SwFieldType* pType = m_pImpl->GetFieldType();
uno::Reference<beans::XPropertySet> const xRet(
SwXFieldMaster::CreateXFieldMaster(m_pImpl->m_pDoc, pType));