sccomp/source/solver/SwarmSolver.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2d150393479bd010c8758b1a1b712f8fb4ce4024
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Tue Jul 28 10:09:02 2020 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Tue Jul 28 11:42:53 2020 +0200

    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 <serval2...@yahoo.fr>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/sccomp/source/solver/SwarmSolver.cxx 
b/sccomp/source/solver/SwarmSolver.cxx
index 0aa75b158c96..d59df283441c 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -508,6 +508,8 @@ void SAL_CALL SwarmSolver::solve()
 
     maStatus.clear();
     mbSuccess = false;
+    if (!maVariables.getLength())
+        return;
 
     maBounds.resize(maVariables.getLength());
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to