Commit a5296350 authored by Morten Welinder's avatar Morten Welinder

internals: add some preconditions.

parent 3c01c154
......@@ -6,6 +6,12 @@
* schemas/org.gnome.gnumeric.gschema.xml.in.in: ditto.
* schemas/org.gnome.gnumeric.plugin.gschema.xml.in.in: ditto.
2011-03-03 Morten Welinder <terra@gnome.org>
* src/value.c (value_new_string_str): Add precondition.
* src/expr.c (gnm_expr_new_constant): Add precondition.
2011-03-01 Morten Welinder <terra@gnome.org>
* src/gnumeric-gconf.c (get_node): Handle absolute keys, assuming
......
......@@ -77,6 +77,8 @@ gnm_expr_new_constant (GnmValue *v)
{
GnmExprConstant *ans;
g_return_val_if_fail (v != NULL, NULL);
ans = CHUNK_ALLOC (GnmExprConstant, expression_pool_small);
if (!ans)
return NULL;
......
......@@ -228,7 +228,11 @@ value_error_classify (GnmValue const *v)
GnmValue *
value_new_string_str (GOString *str)
{
GnmValueStr *v = CHUNK_ALLOC (GnmValueStr, value_string_pool);
GnmValueStr *v;
g_return_val_if_fail (str != NULL, NULL);
v = CHUNK_ALLOC (GnmValueStr, value_string_pool);
*((GnmValueType *)&(v->type)) = VALUE_STRING;
v->fmt = NULL;
v->val = str;
......
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