summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-05-02 02:01:24 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-05-02 02:01:24 +1000
commit6b431b1f0d397067504b5300d49e10e232936836 (patch)
tree7614d01881d257c12ede8f8ead7f30962106abe9 /sw
parentf0bfee74d479f39d500d19c48380d88bdb3ad93d (diff)
coverity#708922 Use after free
Change-Id: I54c098ca4744d33d2f8e1a7799ba6bd5620ed987
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index fe86bd36e33e..c2d2639d8587 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2511,8 +2511,9 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
}
pTmpDel = 0;
}
- if( bGoNext )
+ if( bGoNext && !bDelete )
pTmp = (SwPaM*)pTmp->GetNext();
+
} while( !bGoNext || *ppDelRing != pTmp );
}