From fe13f59e3dabf8891532c3865fdc611ab78db00d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 22 Aug 2014 15:34:25 -0700 Subject: [PATCH] obs_data: Fix wrong data queried for release On release of obs_data, if the default/autoselect values pointed toward a sub-object or a sub-array, it would look up the data for the regular user value. (Palana must have forgot to change these functions around when adding the default/autoselect functionality) --- libobs/obs-data.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libobs/obs-data.c b/libobs/obs-data.c index b1c6ccfc3..69d645f8f 100644 --- a/libobs/obs-data.c +++ b/libobs/obs-data.c @@ -137,7 +137,7 @@ static inline obs_data_t get_item_default_obj(struct obs_data_item *item) if (!item || !item->default_size) return NULL; - return *(obs_data_t*)get_item_data(item); + return *(obs_data_t*)get_default_data_ptr(item); } static inline obs_data_t get_item_autoselect_obj(struct obs_data_item *item) @@ -145,7 +145,7 @@ static inline obs_data_t get_item_autoselect_obj(struct obs_data_item *item) if (!item || !item->autoselect_size) return NULL; - return *(obs_data_t*)get_item_data(item); + return *(obs_data_t*)get_autoselect_data_ptr(item); } static inline obs_data_array_t get_item_array(struct obs_data_item *item) @@ -162,7 +162,7 @@ static inline obs_data_array_t get_item_default_array( if (!item || !item->default_size) return NULL; - return *(obs_data_array_t*)get_item_data(item); + return *(obs_data_array_t*)get_default_data_ptr(item); } static inline obs_data_array_t get_item_autoselect_array( @@ -171,7 +171,7 @@ static inline obs_data_array_t get_item_autoselect_array( if (!item || !item->autoselect_size) return NULL; - return *(obs_data_array_t*)get_item_data(item); + return *(obs_data_array_t*)get_autoselect_data_ptr(item); } static inline void item_data_release(struct obs_data_item *item)