[Core] scan-build: Fix possible dereference of null pointer in switch_loadable_module_sort_codecs()
This commit is contained in:
parent
0d3ee4b2ae
commit
0171e18657
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue