summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-11 09:16:55 +0200
committerNoel Power <noel.power@suse.com>2012-10-11 15:36:18 +0100
commit170521349f3d5e3b6cc16890d66d77121bfd0312 (patch)
tree0b39f83514e4644e7e1da62a3599a490023fe119 /sc
parent0eee6469304ba15f42bcafb6707cc98bcbff9112 (diff)
only access first element if vector is not empty, fdo#55734
Change-Id: I60db486195e7216968dc8c7c7c0c79fb7e8c1b88
Diffstat (limited to 'sc')
-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 bb5475cb725d..a6e6364e126b 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