sw/source/uibase/docvw/edtwin2.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ca1e9a4ac8849c5d7967fe1340295495f328a8c8
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Wed Mar 30 23:06:01 2022 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 31 15:23:33 2022 +0200

    tdf#148061: Crash when opening report from tdf#148042 (DBG_UTIL only)
    
    Change-Id: I30dd54547b1f93e55270d7c029168aff3d0e92bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132339
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/docvw/edtwin2.cxx 
b/sw/source/uibase/docvw/edtwin2.cxx
index 368d4e96727a..b16455db07b0 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -156,9 +156,12 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 #ifdef DBG_UTIL
             case IsAttrAtPos::TableBoxValue:
             {
-                sText = OStringToOUString(OString::number(
-                            static_cast<const 
SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue()),
-                            osl_getThreadTextEncoding());
+                if(aContentAtPos.aFnd.pAttr)
+                {
+                    sText = OStringToOUString(OString::number(
+                                static_cast<const 
SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue()),
+                                osl_getThreadTextEncoding());
+                }
                 break;
             }
             case IsAttrAtPos::CurrAttrs:

Reply via email to