summaryrefslogtreecommitdiff
path: root/sccomp
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-07-28 10:09:02 +0200
committerAndras Timar <andras.timar@collabora.com>2020-08-02 10:32:55 +0200
commit8e32e9143522c2c10170972b46a3fc691a221577 (patch)
tree6822b326e0c7ffa46c6ef79d41e9c0ec5162e18c /sccomp
parentc1d6f8458eaeeeb09479f88cb2a80f39464cdc1b (diff)
tdf#135211: fix crash Swarm Non Linear Solver with blank input
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=163668 Change-Id: I78f59e420aa183399f650915c7c28a138b8ed444 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99572 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 2d150393479bd010c8758b1a1b712f8fb4ce4024) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99546 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 2080c4e2a4852538d3739d70e3c706ec3fc8fb28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99736 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sccomp')
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index c15745cf7eee..f7961b66d053 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -501,6 +501,8 @@ void SAL_CALL SwarmSolver::solve()
maStatus.clear();
mbSuccess = false;
+ if (!maVariables.getLength())
+ return;
maBounds.resize(maVariables.getLength());