summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-11 09:16:55 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-11 09:21:35 +0200
commit132740681c7412f4d678ff0768b9807502525f76 (patch)
treebf0ef0e79bd3f2a98ab963a906da0680e8160f24
parent82bba1a2b3b8274f8282c8c8b4ab31857a1e60b6 (diff)
only access first element if vector is not empty, fdo#55734
Change-Id: I60db486195e7216968dc8c7c7c0c79fb7e8c1b88
-rw-r--r--sc/source/core/tool/dbdata.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 3e6664dbdbb3..7b142cc2c87d 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -455,7 +455,9 @@ bool ScDBData::HasQueryParam() const
bool ScDBData::HasSortParam() const
{
- return mpSortParam && mpSortParam->maKeyState[0].bDoSort;
+ return mpSortParam &&
+ !mpSortParam->maKeyState.empty() &&
+ mpSortParam->maKeyState[0].bDoSort;
}
bool ScDBData::HasSubTotalParam() const