Browse Source

libobs: Return NULL on ending property list string

Instead of returning a valid string value when there are no more strings
available in the list, return NULL to indicate failure.  An empty string
should really be allowed to be a valid value for the list.
jp9000 10 years ago
parent
commit
5d30f268a0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/obs-properties.c

+ 1 - 1
libobs/obs-properties.c

@@ -695,7 +695,7 @@ const char *obs_property_list_item_string(obs_property_t *p, size_t idx)
 {
 	struct list_data *data = get_list_fmt_data(p, OBS_COMBO_FORMAT_STRING);
 	return (data && idx < data->items.num) ?
-		data->items.array[idx].str : "";
+		data->items.array[idx].str : NULL;
 }
 
 long long obs_property_list_item_int(obs_property_t *p, size_t idx)