editeng/source/uno/unotext.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 099cd6047360db3bf3df89b9511c24ea507beeb8
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sat Dec 11 17:53:20 2021 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Dec 13 11:29:24 2021 +0100

    tdf#146179: fix Dev Tools crash when inspecting object in special file
    
    0  0x00007f3177297361 in SvxUnoTextBase::createEnumeration() 
(this=0x313ba98) at editeng/source/uno/unotext.cxx:1911
    1  0x00007f317729751d in non-virtual thunk to 
SvxUnoTextBase::createEnumeration() () at editeng/source/uno/unotext.cxx:1918
    2  0x00007f31755c2a7b in (anonymous 
namespace)::GenericPropertiesNode::fillChildren(std::unique_ptr<weld::TreeView, 
std::default_delete<weld::TreeView> >&, weld::TreeIter const*)
       (this=0x7ffee92c8140, pTree=std::unique_ptr<weld::TreeView> = {...}, 
pParent=0x0) at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:719
    3  0x00007f31755c15f1 in 
ObjectInspectorTreeHandler::appendProperties(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
 const&)
       (this=0x8e499d0, xInterface=uno::Reference to (SvxPluginShape *) 
0x313b8e0) at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:1270
    4  0x00007f31755c0e85 in 
ObjectInspectorTreeHandler::NotebookEnterPage(rtl::OString const&) 
(this=0x8e499d0, rPageId="object_inspector_properties_tab")
       at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:1154
    5  0x00007f31755befa0 in 
ObjectInspectorTreeHandler::LinkStubNotebookEnterPage(void*, rtl::OString 
const&) (instance=0x8e499d0, data="object_inspector_properties_tab")
        at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:1129
    ...
    (gdb) p GetEditSource()
    $2 = (SvxEditSource *) 0x0
    
    See full bt here:
    https://bugs.documentfoundation.org/attachment.cgi?id=176872
    
    Change-Id: I1f3f48c742a2a3c6a2abcb2ed06d8f60e6f7a77f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126666
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    (cherry picked from commit a5f2f989a0a7a5b602b7f3e39e99d7f4c2342cee)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126678
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 5ae3ffac7522..59a5688017e8 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1893,6 +1893,10 @@ void SAL_CALL SvxUnoTextBase::setString( const OUString& 
aString )
 uno::Reference< container::XEnumeration > SAL_CALL 
SvxUnoTextBase::createEnumeration()
 {
     SolarMutexGuard aGuard;
+
+    if (!GetEditSource())
+        return uno::Reference< container::XEnumeration >();
+
     if( maSelection == ESelection(0,0,0,0) || maSelection == 
ESelection(EE_PARA_MAX_COUNT,0,0,0) )
     {
         ESelection aSelection;

Reply via email to