[Libreoffice-commits] .: sc/source
Noel Power
noelp at kemper.freedesktop.org
Thu May 17 14:05:01 PDT 2012
sc/source/ui/view/viewdata.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 8b1d29bc9b00bc2730738a990023a65ab6e0219b
Author: Noel Power <noel.power at novell.com>
Date: Thu May 17 22:03:46 2012 +0100
fix bad stl access fdo#45987
Change-Id: I0e6b29987381380e22aeaf07725e04de4ae76c54
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index b7de81a..e7f8882 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -486,11 +486,14 @@ void ScViewData::InsertTabs( SCTAB nTab, SCTAB nNewSheets )
void ScViewData::DeleteTab( SCTAB nTab )
{
- delete maTabData.at(nTab);
+ if ( nTab < maTabData.size() )
+ {
+ delete maTabData.at(nTab);
- maTabData.erase(maTabData.begin() + nTab);
- UpdateCurrentTab();
- mpMarkData->DeleteTab( nTab );
+ maTabData.erase(maTabData.begin() + nTab);
+ UpdateCurrentTab();
+ mpMarkData->DeleteTab( nTab );
+ }
}
void ScViewData::DeleteTabs( SCTAB nTab, SCTAB nSheets )
More information about the Libreoffice-commits
mailing list