mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
Fix crash when selected file doesn't contain any vcard
This commit is contained in:
parent
3782799e02
commit
132f389bfd
1 changed files with 4 additions and 4 deletions
|
|
@ -38,10 +38,10 @@ extern "C" void linphone_vcard_free(LinphoneVCard *vcard) {
|
|||
|
||||
extern "C" MSList* linphone_vcard_new_from_vcard4_file(const char *filename) {
|
||||
MSList *result = NULL;
|
||||
if (filename) {
|
||||
if (ortp_file_exist(filename) == 0) {
|
||||
belcard::BelCardParser *parser = new belcard::BelCardParser();
|
||||
shared_ptr<belcard::BelCardList> belCards = parser->parseFile(filename);
|
||||
if (filename && ortp_file_exist(filename) == 0) {
|
||||
belcard::BelCardParser *parser = new belcard::BelCardParser();
|
||||
shared_ptr<belcard::BelCardList> belCards = parser->parseFile(filename);
|
||||
if (belCards) {
|
||||
for (auto it = belCards->getCards().begin(); it != belCards->getCards().end(); ++it) {
|
||||
shared_ptr<belcard::BelCard> belcard = (*it);
|
||||
LinphoneVCard *vcard = linphone_vcard_new();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue