{
const struct variable *var = psppire_dict_get_variable (store->dict, col);
+ if (NULL == var)
+ return;
+
union value v;
value_init (&v, var_get_width (var));
v.f = g_value_get_double (value);
{
/* A single cell is selected */
const struct variable *var = psppire_dict_get_variable (de->dict, sel->start_x);
-
- ref_cell_text = g_strdup_printf (_("%d : %s"),
- sel->start_y + 1, var_get_name (var));
+
+ if (var)
+ ref_cell_text = g_strdup_printf (_("%d : %s"),
+ sel->start_y + 1, var_get_name (var));
}
else
{
PsppireDataStore *store = PSPPIRE_DATA_STORE (tree_model);
const struct variable *variable = psppire_dict_get_variable (store->dict, column);
+ if (NULL == variable)
+ return;
if (var_is_numeric (variable))
g_value_init (value, G_TYPE_DOUBLE);
const struct variable *variable = psppire_dict_get_variable (store->dict, idx);
+ if (NULL == variable)
+ return 0;
+
if (var_is_numeric (variable))
return G_TYPE_DOUBLE;