Commit ce20b30a authored by Jukka-Pekka Iivonen's avatar Jukka-Pekka Iivonen Committed by jpekka

Fixed a crash when the specified target cell was empty.

2002-03-15  Jukka-Pekka Iivonen  <jiivonen@hutcs.cs.hut.fi>

        * dialog-solver.c (cb_dialog_solve_clicked): Fixed a crash
	when the specified target cell was empty.
parent 58a2d971
......@@ -2,6 +2,8 @@
* dialog-solver.c (cb_dialog_solve_clicked): Changes related to
the enumeration of the solver's status type.
(cb_dialog_solve_clicked): Fixed a crash when the specified target
cell was empty.
2002-03-14 Andreas J. Guelzow <aguelzow@taliesin.ca>
......
......@@ -692,6 +692,17 @@ cb_dialog_solve_clicked (GtkWidget *button, SolverState *state)
sheet_cell_fetch (state->sheet,
target_range->v_range.cell.a.col,
target_range->v_range.cell.a.row );
/* Check that the target cell type is number. */
if (! cell_is_number (state->sheet->solver_parameters->target_cell)) {
gnumeric_notice_nonmodal
((GtkWindow *) state->dialog,
&(state->warning_dialog),
GTK_MESSAGE_WARNING, _("Target cell should contain "
"a formula."));
return;
}
result = workbook_foreach_cell_in_range (
eval_pos_init_sheet (&pos, state->sheet),
input_range, FALSE, grab_cells, &input_cells);
......
......@@ -4,7 +4,6 @@ Regarding LP & ILP:
Critical bugs:
* fix crash: INT constraints support
* fix crash: MPS import when a model has already defined
* fix crash: if ("target cell" -> NULL) && ("input cells" -> NULL) then crach
* fix bug: check that target cell contains a formula
* fix bug: check that constraint LHS contains a number value
* fix bug: check that constraint RHS is a number value
......@@ -13,6 +12,7 @@ Critical bugs:
- a badly formulated program may still crash the spreadsheet
Usability fixes:
* add warnings if data in cells is going to be overwritten
* add `keep original values dialog'
- fix the saving of these values twice
* get_lp_coeff: test that it's really LP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment