Don't crash when resizing columns with no associated variable
[pspp-builds.git] / src / ui / gui / psppire-data-editor.c
index 0fe4f68091b1d8395d8d7c8e0e1c437b56035e63..92250255f501eea0316a023dc44709d7309961c7 100644 (file)
@@ -274,6 +274,9 @@ rewidth_variable (GtkWidget *w, gint unit, glong size)
   const PsppireDict *dict = de->data_store->dict;
   struct variable *var = psppire_dict_get_variable (dict, unit);
 
+  if (NULL == var)
+    return;
+
   var_set_display_width (var, size / (float) width_of_m (w));
 }