diff options
-rw-r--r-- | libhb/common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/common.c b/libhb/common.c index 97d84ff60..00810dd79 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -739,8 +739,10 @@ int hb_audio_add(const hb_job_t * job, const hb_audio_config_t * audiocfg) hb_audio_config_t * hb_list_audio_config_item(hb_list_t * list, int i) { assert(list != NULL); + hb_audio_t *audio = NULL; - hb_audio_t *audio = hb_list_item(list, i); + if( (audio = hb_list_item(list, i)) ) + return &(audio->config); - return &(audio->config); + return NULL; } |