diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index bc45e07e2..4d22aec51 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4218,9 +4218,11 @@ bctbx_list_t * linphone_core_get_sound_devices_list(const LinphoneCore *lc){ bctbx_list_t * linphone_core_get_video_devices_list(const LinphoneCore *lc){ bctbx_list_t *cards_list = NULL; const char** cards = lc->video_conf.cams; - for (const char* c = *cards; c; c=*++cards) { - cards_list = bctbx_list_append(cards_list, (char *)c); - } + + if (cards) + for (const char* c = *cards; c; c=*++cards) + cards_list = bctbx_list_append(cards_list, (char *)c); + return cards_list; }