[Libreoffice-commits] core.git: sw/source

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


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

New commits:
commit 36defda96fc62cef1e1ffb725f6768d54b0d9cd0
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:05: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>

diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 3c31a1124efd..7759844fe93d 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