fix segfault on video_bug_thread when other_pop is empty

This commit is contained in:
Antonio Silva 2024-06-25 10:11:53 +01:00
parent 70c5520466
commit 9f088b08eb
1 changed files with 5 additions and 0 deletions

View File

@ -678,6 +678,11 @@ static void *SWITCH_THREAD_FUNC video_bug_thread(switch_thread_t *thread, void *
if (switch_queue_trypop(other_q, &other_pop) == SWITCH_STATUS_SUCCESS) {
switch_img_free(&other_img);
if (!other_pop) {
goto end;
}
other_img = (switch_image_t *) other_pop;
if (IMG && !(other_last_w == other_img->d_w && other_last_h == other_img->d_h)) {