[libvpx] scan-build: avoid dereference of null pointer
This commit is contained in:
parent
b9b0b00912
commit
1499acac9d
|
@ -299,6 +299,8 @@ static INLINE int get_free_fb(VP9_COMMON *cm) {
|
||||||
static INLINE void ref_cnt_fb(RefCntBuffer *bufs, int *idx, int new_idx) {
|
static INLINE void ref_cnt_fb(RefCntBuffer *bufs, int *idx, int new_idx) {
|
||||||
const int ref_index = *idx;
|
const int ref_index = *idx;
|
||||||
|
|
||||||
|
if (!bufs) return;
|
||||||
|
|
||||||
if (ref_index >= 0 && bufs[ref_index].ref_count > 0)
|
if (ref_index >= 0 && bufs[ref_index].ref_count > 0)
|
||||||
bufs[ref_index].ref_count--;
|
bufs[ref_index].ref_count--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue