Commit c93eb9a4 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

add some safety. Default to A1 if no position is supplied.

2002-01-04  Jody Goldberg <jody@gnome.org>

	* src/eval.c (dependent_unlink) : add some safety.  Default to A1 if
	  no position is supplied.
parent 9ceeb388
2002-01-04 Jody Goldberg <jody@gnome.org>
* src/eval.c (dependent_unlink) : add some safety. Default to A1 if
no position is supplied.
* src/gnumeric-graph.c (gnm_graph_series_get_dimension) : more
protection for missing series.
(gnm_graph_series_add_dimension) : ditto.
......
2002-01-04 Jody Goldberg <jody@gnome.org>
* src/eval.c (dependent_unlink) : add some safety. Default to A1 if
no position is supplied.
* src/gnumeric-graph.c (gnm_graph_series_get_dimension) : more
protection for missing series.
(gnm_graph_series_add_dimension) : ditto.
......
2002-01-04 Jody Goldberg <jody@gnome.org>
* src/eval.c (dependent_unlink) : add some safety. Default to A1 if
no position is supplied.
* src/gnumeric-graph.c (gnm_graph_series_get_dimension) : more
protection for missing series.
(gnm_graph_series_add_dimension) : ditto.
......
2002-01-04 Jody Goldberg <jody@gnome.org>
* src/eval.c (dependent_unlink) : add some safety. Default to A1 if
no position is supplied.
* src/gnumeric-graph.c (gnm_graph_series_get_dimension) : more
protection for missing series.
(gnm_graph_series_add_dimension) : ditto.
......
......@@ -671,8 +671,12 @@ dependent_link (Dependent *dep, CellPos const *pos)
void
dependent_unlink (Dependent *dep, CellPos const *pos)
{
static CellPos const dummy = { 0, 0 };
g_return_if_fail (dep != NULL);
if (pos == NULL)
pos == &dummy;
if (dep->sheet != NULL) {
g_return_if_fail (dep->expression != NULL);
g_return_if_fail (dep->flags & DEPENDENT_IN_EXPR_LIST);
......
......@@ -671,8 +671,12 @@ dependent_link (Dependent *dep, CellPos const *pos)
void
dependent_unlink (Dependent *dep, CellPos const *pos)
{
static CellPos const dummy = { 0, 0 };
g_return_if_fail (dep != NULL);
if (pos == NULL)
pos == &dummy;
if (dep->sheet != NULL) {
g_return_if_fail (dep->expression != NULL);
g_return_if_fail (dep->flags & DEPENDENT_IN_EXPR_LIST);
......
......@@ -174,11 +174,10 @@ style_condition_link (StyleCondition *sc, Sheet *sheet)
void
style_condition_unlink (StyleCondition *sc)
{
static CellPos const pos = { 0, 0 };
g_return_if_fail (sc != NULL);
do {
if (sc->u.expr.dep.expression != NULL)
dependent_unlink (&sc->u.expr.dep, &pos);
dependent_unlink (&sc->u.expr.dep, NULL);
sc = sc->next;
} while (sc != NULL);
}
......
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