diff options
author | John Stebbins <[email protected]> | 2018-05-30 15:11:18 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2018-05-30 15:11:18 -0700 |
commit | d8347e1b414fc05425fac84dbd0c8f1b66d017c9 (patch) | |
tree | b2a540e731de5203e0b38b4d042348849fc30c1c /libhb/scan.c | |
parent | 2ce1b6d7fbabc27a391ad92927d803a1c1804ac2 (diff) |
scan: fix crash due to last commit
check codec_name and profile_name for NULL before strstr search.
Diffstat (limited to 'libhb/scan.c')
-rw-r--r-- | libhb/scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/scan.c b/libhb/scan.c index 8c35ddbe8..6708516bd 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -1243,7 +1243,8 @@ static void LookForAudio(hb_scan_t *scan, hb_title_t * title, hb_buffer_t * b) codec_name = codec->name; break; } - if (strstr(profile_name, codec_name) != NULL) + if (profile_name != NULL && codec_name != NULL && + strstr(profile_name, codec_name) != NULL) { codec_name = NULL; } |