https://bugs.documentfoundation.org/show_bug.cgi?id=148949
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |haveBacktrace --- Comment #6 from Julien Nabet <[email protected]> --- I tried this naive patch: diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index 110f138f5f3b..6f7855518271 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -99,7 +99,8 @@ SwUndoFormatDelete::SwUndoFormatDelete m_rDoc(rDoc), m_sOldName(_pOld->GetName()), m_aOldSet(_pOld->GetAttrSet()) { - m_sDerivedFrom = _pOld->DerivedFrom()->GetName(); + if (_pOld->DerivedFrom()) + m_sDerivedFrom = _pOld->DerivedFrom()->GetName(); m_nId = _pOld->GetPoolFormatId() & COLL_GET_RANGE_BITS; m_bAuto = _pOld->IsAuto(); } it won't crash the first time I run the macro but it crashes on a second time with this bt: #0 SwClient::GetRegisteredIn() const (this=0x6666666600000001) at sw/inc/calbck.hxx:164 #1 0x00007f58c79db525 in SwFormat::DerivedFrom() const (this=0x6666666600000001) at sw/inc/format.hxx:128 #2 0x00007f58c79e9ad5 in SwFormat::IsDefault() const (this=0x6666666600000001) at sw/inc/format.hxx:129 #3 0x00007f58c8df50ab in lcl_FindCharFormat(SwDoc&, rtl::OUString const&, SwDocStyleSheet*, bool) (rDoc=..., rName="No Character Style", pStyle=0x58a2f30, bCreate=false) at sw/source/uibase/app/docstyle.cxx:146 #4 0x00007f58c8df2c03 in SwDocStyleSheet::FillStyleSheet(SwDocStyleSheet::FillStyleType, std::optional<SfxItemSet>*) (this=0x58a2f30, eFType=SwDocStyleSheet::FillOnlyName, o_ppFlatSet=0x0) at sw/source/uibase/app/docstyle.cxx:1878 #5 0x00007f58c8dfe859 in SwDocStyleSheetPool::Find(rtl::OUString const&, SfxStyleFamily, SfxStyleSearchBits) (this=0x58a3b10, rName="No Character Style", eFam=SfxStyleFamily::Char, n=SfxStyleSearchBits::All) at sw/source/uibase/app/docstyle.cxx:2603 #6 0x00007f58c8a26629 in sw::(anonymous namespace)::XStyleFamily::removeByName(rtl::OUString const&) (this=0x62c3cb0, rName="Standard") at sw/source/core/unocore/unostyle.cxx:1063 There must something really wrong but I don't know what. -- You are receiving this mail because: You are the assignee for the bug.
