summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-11-15 16:07:13 -0800
committerJohn Stebbins <[email protected]>2015-11-15 16:07:13 -0800
commit7cdced99fcfbb1ac72ce22420e24b2902b3f8ea6 (patch)
tree32f09b0453ee364768fbbc98261c281eb532293d /libhb
parentb81fe227ab7f6e422c0558d348c4b360e1a1ef74 (diff)
libhb: add some NULL checks
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 43c4d7601..044e75109 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -2843,6 +2843,7 @@ void hb_buffer_list_close(hb_buffer_list_t *list)
int hb_buffer_list_count(hb_buffer_list_t *list)
{
+ if (list == NULL) return 0;
return list->count;
}
@@ -2894,6 +2895,7 @@ hb_list_t * hb_list_init()
*********************************************************************/
int hb_list_count( const hb_list_t * l )
{
+ if (l == NULL) return 0;
return l->items_count;
}
@@ -3120,7 +3122,9 @@ void hb_list_close( hb_list_t ** _l )
hb_list_t * l = *_l;
if (l == NULL)
+ {
return;
+ }
free( l->items );
free( l );