[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 26 09:52:35 UTC 2019


 sw/source/core/unocore/unofield.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 7133af309a810d9caea0cd05cea4f784aac7456b
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Jun 21 19:03:36 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Jun 26 11:51:56 2019 +0200

    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 at cib.de>
    (cherry picked from commit 36defda96fc62cef1e1ffb725f6768d54b0d9cd0)
    Reviewed-on: https://gerrit.libreoffice.org/74729

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));


More information about the Libreoffice-commits mailing list