diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-15 14:43:27 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-24 16:54:38 +0100 |
commit | d07d2ed5aa2a9c955b30e989246a5862e5b29c5d (patch) | |
tree | 0bb060806d573cebcff7f7219b768dacd2594225 /sw | |
parent | 26c1f430add40af2654c70430e945368be0c43f6 (diff) |
Resolves: rhbz#1162352 SwDataChanged dtor accesses deleted PaM
an old bug that I finally hit on by typing one paragraph
of three lines consisting of repeated "Apple " and the cursor
at position 0 and click the bullet icon
(cherry picked from commit 3cb3396e4a4b36e5a05892da16b076feaef6b2b1)
Conflicts:
sw/source/core/doc/docfmt.cxx
Change-Id: I90e998561f2645ebfa51423bcaab9a4195144338
Reviewed-on: https://gerrit.libreoffice.org/13933
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 18e5137aaa05..8aa95d4f1b83 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -363,10 +363,10 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, } // #i96644# - boost::scoped_ptr< SwDataChanged > pDataChanged; + boost::scoped_ptr< SwDataChanged > xDataChanged; if ( bSendDataChangedEvents ) { - pDataChanged.reset( new SwDataChanged( *pPam ) ); + xDataChanged.reset( new SwDataChanged( *pPam ) ); } SwHistory* pHst = 0; if (GetIDocumentUndoRedo().DoesUndo()) @@ -468,10 +468,12 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, GetNodes().ForEach( pStt->nNode, aTmpEnd, lcl_RstTxtAttr, &aPara ); } + SetModified(); + + xDataChanged.reset(); //before delete pPam + if( pPam != &rRg ) delete pPam; - - SetModified(); } #define DELETECHARSETS if ( bDelete ) { delete pCharSet; delete pOtherSet; } |