summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-11 09:16:55 +0200
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-10-11 15:00:39 -0400
commit4126a8e2244d0c320a53c5720c3d5664563c8acc (patch)
tree3ea2352177f2b722bab7bf89f79816c765cf58b2
parentb69fc5c2c85d06e89a43a07734f1b87c0c35f751 (diff)
only access first element if vector is not empty, fdo#55734
Change-Id: I60db486195e7216968dc8c7c7c0c79fb7e8c1b88 Signed-off-by: Noel Power <nopower@suse.com> Signed-off-by: Eike Rathke <erack@redhat.com> Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
-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