summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-05-30 15:11:18 -0700
committerJohn Stebbins <[email protected]>2018-05-30 15:11:18 -0700
commitd8347e1b414fc05425fac84dbd0c8f1b66d017c9 (patch)
treeb2a540e731de5203e0b38b4d042348849fc30c1c /libhb
parent2ce1b6d7fbabc27a391ad92927d803a1c1804ac2 (diff)
scan: fix crash due to last commit
check codec_name and profile_name for NULL before strstr search.
Diffstat (limited to 'libhb')
-rw-r--r--libhb/scan.c3
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;
}