summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-19 18:03:43 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-19 18:15:51 +0100
commit9fda4ee058d07d5909fdd0b39bb63527954e9b8a (patch)
tree44bbe4ccb80dfc68ec3b5b9b9fcd7ef9a90d40ac /sw
parentd27fcc53c87fc31fa24cc9446da637d420730b56 (diff)
CID#1158520: use after free
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/accpara.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8219aed3c21b..01ec32204951 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3674,7 +3674,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd
}
}
// else: this PaM is collapsed and doesn't select anything
- pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ if(!bRet)
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
}
while( !bRet && (pCrsr != pRingStart) );
}