gui: Fix crash in Paired T-Test dialog on selecting first variable.
[pspp-builds.git] / src / ui / gui / psppire-var-view.c
index 73bd9d8de225cf33fbe86e5768486e6f9d1edfb9..a840539dcba38087d037fdc56235b9bee8460d74 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -141,7 +141,7 @@ display_cell_var_name (GtkTreeViewColumn *tree_column,
 
   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);
 }