[Libreoffice-commits] .: Branch 'libreoffice-3-6-3' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 11 12:01:12 PDT 2012


 sc/source/core/tool/dbdata.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 4126a8e2244d0c320a53c5720c3d5664563c8acc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Oct 11 09:16:55 2012 +0200

    only access first element if vector is not empty, fdo#55734
    
    Change-Id: I60db486195e7216968dc8c7c7c0c79fb7e8c1b88
    Signed-off-by: Noel Power <nopower at suse.com>
    Signed-off-by: Eike Rathke <erack at redhat.com>
    Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>

diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index bb5475c..a6e6364 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


More information about the Libreoffice-commits mailing list