Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
5d30f268a0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)