When a variable is moved into the list of selected variables in the
Paired T-Test dialog, that row of the treeview has one nonnull
variable and one null variable. Calling var_get_name(NULL) causes a
segfault.
I'm not certain that this is the correct fix, but it fixes the
segfault. The missing variable is now shown as <unset> until a second
variable is moved into the treeview.
Bug #32958.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009 Free Software Foundation
+ Copyright (C) 2009, 2011 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
g_value_unset (&value);
- g_object_set (cell, "text", var_get_name (var), NULL);
+ g_object_set (cell, "text", var ? var_get_name (var) : "<unset>", NULL);
}