未验证 提交 01b7af27 编写于 作者: J Jim 提交者: GitHub

Merge pull request #1864 from jpark37/bad-types

libobs: Fix crashes from wrong types
...@@ -156,7 +156,7 @@ static inline void int_data_free(struct int_data *data) { ...@@ -156,7 +156,7 @@ static inline void int_data_free(struct int_data *data) {
bfree(data->suffix); bfree(data->suffix);
} }
static inline void float_data_free(struct int_data *data) { static inline void float_data_free(struct float_data *data) {
if (data->suffix) if (data->suffix)
bfree(data->suffix); bfree(data->suffix);
} }
...@@ -897,7 +897,7 @@ double obs_property_float_step(obs_property_t *p) ...@@ -897,7 +897,7 @@ double obs_property_float_step(obs_property_t *p)
const char *obs_property_float_suffix(obs_property_t *p) const char *obs_property_float_suffix(obs_property_t *p)
{ {
struct int_data *data = get_type_data(p, OBS_PROPERTY_FLOAT); struct float_data *data = get_type_data(p, OBS_PROPERTY_FLOAT);
return data ? data->suffix : NULL; return data ? data->suffix : NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册