summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/hb_json.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/hb_json.c b/libhb/hb_json.c
index f8d58f683..882a3f76b 100644
--- a/libhb/hb_json.c
+++ b/libhb/hb_json.c
@@ -801,6 +801,11 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict )
}
job = hb_job_init_by_index(h, titleindex);
+ if (job == NULL)
+ {
+ hb_error("hb_dict_to_job: Title %d doesn't exist", titleindex);
+ return NULL;
+ }
hb_value_array_t *chapter_list = NULL;
hb_value_array_t *audio_list = NULL;