diff options
author | jstebbins <[email protected]> | 2015-03-11 14:42:33 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-03-11 14:42:33 +0000 |
commit | 842f2ec78e8d64957db8ee3d7e7ada7d9e133487 (patch) | |
tree | 4453666a1f4d9eec16650c9574c55889d1d11885 /libhb/work.c | |
parent | 5659591f18115c3eeeb94717395148a38cb7a806 (diff) |
json: fix crash when foreign audio search is *not* enabled
Also, prevent crashes that occur when the json is not properly parsed.
It will still fail to encode, but we will capture the parse failure in
the log.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6983 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libhb/work.c b/libhb/work.c index 01060c01f..b3d0744d7 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -106,6 +106,13 @@ static void work_func( void * _work ) // Expand json string to full job struct hb_job_t *new_job = hb_json_to_job(job->h, job->json); + if (new_job == NULL) + { + hb_job_close(&job); + hb_list_close(&passes); + *work->die = 1; + break; + } new_job->h = job->h; hb_job_close(&job); job = new_job; |