Fix crash when opening empty dataset
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 6 Jul 2009 17:38:21 +0000 (01:38 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 6 Jul 2009 17:38:21 +0000 (01:38 +0800)
src/ui/gui/psppire-data-store.c

index 07795124338fab69cd40b4e268641edb48648b47..65001dd170d98a3edaa903a619244b38e931b38f 100644 (file)
@@ -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));
 }