[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] gui: Fix crash in Paired T-Test dialog on selecting first va
From: |
Ben Pfaff |
Subject: |
[PATCH 2/2] gui: Fix crash in Paired T-Test dialog on selecting first variable. |
Date: |
Sat, 9 Apr 2011 16:53:35 -0700 |
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.
---
src/ui/gui/psppire-var-view.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ui/gui/psppire-var-view.c b/src/ui/gui/psppire-var-view.c
index 73bd9d8..a840539 100644
--- a/src/ui/gui/psppire-var-view.c
+++ b/src/ui/gui/psppire-var-view.c
@@ -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);
}
--
1.7.2.5