Test for NULL before calling strdup
[pspp] / src / ui / gui / select-cases-dialog.c
index e4d599edc8124480e2b51afb45ef1a25e44e7ca4..3c36f4ededbfa10c201e959af1d235b017d43683 100644 (file)
@@ -21,8 +21,9 @@
 #include "helper.h"
 #include "psppire-dialog.h"
 #include "psppire-data-window.h"
-#include "dialog-common.h"
+#include "psppire-selector.h"
 #include "dict-display.h"
+#include "dialog-common.h"
 #include "widget-io.h"
 #include <language/syntax-string-source.h>
 #include "helper.h"
@@ -324,9 +325,10 @@ select_cases_dialog (GObject *o, gpointer data)
   {
     GtkWidget *source = get_widget_assert   (scd.xml, "select-cases-treeview");
 
-    attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
-                                  scd.data_store->dict,
-                                  GTK_SELECTION_SINGLE, NULL);
+    g_object_set (source, "dictionary",
+                 scd.data_store->dict,
+                 "selection-mode",
+                 GTK_SELECTION_SINGLE, NULL);
 
     psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
                                   source,