[Core] scan-build: Fix possible dereference of null pointer in switch_loadable_module_sort_codecs()

This commit is contained in:
Andrey Volk 2020-02-16 01:29:04 +04:00
parent 0d3ee4b2ae
commit 0171e18657
1 changed files with 1 additions and 1 deletions

View File

@ -2696,7 +2696,7 @@ static void switch_loadable_module_sort_codecs(const switch_codec_implementation
#endif
}
if (i > 0 && strcasecmp(array[i]->iananame, array[i-1]->iananame) && this_ptime != sorted_ptime) {
if (i > 0 && array[i-1] && strcasecmp(array[i]->iananame, array[i-1]->iananame) && this_ptime != sorted_ptime) {
int j;
int swapped = 0;