From ff83a4fc52c1ff7603dd2b26593a5231c4a5c2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 1 Mar 2011 13:31:10 +0000 Subject: [PATCH] Resolves: rhbz#681159 bandaid for crash --- sw/source/ui/uiview/viewtab.cxx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 0307a69..02fede0 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if(bIsTableRTL) { USHORT nColCount = aColItem.Count() - 1; - for ( USHORT i = 0; i < nColCount; ++i ) + for ( USHORT i = 0; i < nColCount && i < aTabCols.Count(); ++i ) { const SvxColumnDescription& rCol = aColItem[nColCount - i]; aTabCols[i] = aTabCols.GetRight() - rCol.nStart; @@ -703,7 +703,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - for ( USHORT i = 0; i < aColItem.Count()-1; ++i ) + for ( USHORT i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i ) { const SvxColumnDescription& rCol = aColItem[i]; aTabCols[i] = rCol.nEnd + aTabCols.GetLeft(); -- 1.7.4.1