From 1485e3a189c42b1ac1339c063c85d9e74e503431 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 7 Jul 2009 01:38:21 +0800 Subject: [PATCH] Fix crash when opening empty dataset --- src/ui/gui/psppire-data-store.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 07795124..65001dd1 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -801,6 +801,9 @@ get_column_button_label (const PsppireSheetModel *model, gint col) pv = psppire_dict_get_variable (ds->dict, col); + if (NULL == pv) + return NULL; + return xstrdup (var_get_name (pv)); } -- 2.30.2