Updated the test widget thing a bit
[pspp] / src / ui / gui / find-dialog.c
index 0f856f94629d29c58383d9a1fc3d078015b47bf4..8dea41768ae6fba92d39f94cd037edc8f2d8ae30 100644 (file)
@@ -471,8 +471,13 @@ string_label_compare (const struct comparator *cmptr,
   const struct string_comparator *ssc =
     (const struct string_comparator *) cmptr;
 
+  int width;
+
   const char *text = var_lookup_value_label (cmptr->var, val);
-  int width = strlen (text);
+  if (text == NULL)
+    return false;
+
+  width = strlen (text);
 
   assert ( cmptr->flags & STR_CMP_LABELS);