[gnumeric] lpsolve: fix stop.



commit ee503552944c17bfdf6f764b5700ea37134193b1
Author: Morten Welinder <terra gnome org>
Date:   Sun Nov 15 11:26:10 2009 -0500

    lpsolve: fix stop.

 plugins/lpsolve/ChangeLog     |    4 ++++
 plugins/lpsolve/gnm-lpsolve.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/lpsolve/ChangeLog b/plugins/lpsolve/ChangeLog
index 2ebfed1..5c6e98f 100644
--- a/plugins/lpsolve/ChangeLog
+++ b/plugins/lpsolve/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-15  Morten Welinder  <terra gnome org>
+
+	* gnm-lpsolve.c (gnm_lpsolve_stop): Fix precondition.
+
 2009-11-12  Morten Welinder  <terra gnome org>
 
 	* lpsolve-write.c (lpsolve_affine_func): Add cst argument and
diff --git a/plugins/lpsolve/gnm-lpsolve.c b/plugins/lpsolve/gnm-lpsolve.c
index e444737..d8f575a 100644
--- a/plugins/lpsolve/gnm-lpsolve.c
+++ b/plugins/lpsolve/gnm-lpsolve.c
@@ -273,7 +273,7 @@ gnm_lpsolve_start (GnmSolver *sol, WorkbookControl *wbc, GError **err,
 static gboolean
 gnm_lpsolve_stop (GnmSolver *sol, GError *err, GnmLPSolve *lp)
 {
-	g_return_val_if_fail (sol->status != GNM_SOLVER_STATUS_RUNNING, FALSE);
+	g_return_val_if_fail (sol->status == GNM_SOLVER_STATUS_RUNNING, FALSE);
 
 	gnm_lpsolve_cleanup (lp);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]