mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-19 13:56:06 -04:00
libobs/util: Fix warnings for about null usages
This commit is contained in:
@@ -409,8 +409,10 @@ static inline void darray_move_item(const size_t element_size,
|
||||
return;
|
||||
|
||||
temp = malloc(element_size);
|
||||
if (!temp)
|
||||
if (!temp) {
|
||||
bcrash("darray_move_item: out of memory");
|
||||
return;
|
||||
}
|
||||
|
||||
p_from = darray_item(element_size, dst, from);
|
||||
p_to = darray_item(element_size, dst, to);
|
||||
|
||||
@@ -229,8 +229,7 @@ static inline void dstr_ensure_capacity(struct dstr *dst, const size_t new_size)
|
||||
|
||||
static inline void dstr_copy_dstr(struct dstr *dst, const struct dstr *src)
|
||||
{
|
||||
if (dst->array)
|
||||
dstr_free(dst);
|
||||
dstr_free(dst);
|
||||
|
||||
if (src->len) {
|
||||
dstr_ensure_capacity(dst, src->len + 1);
|
||||
|
||||
Reference in New Issue
Block a user