From a3fbb53b246b53f5c19a5a8a6a0b9f7947e9d970 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 10 Apr 2017 13:40:46 +0200 Subject: [PATCH] feat(account_creator): set_email deals with undefined email --- coreapi/account_creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index 3c65d4fff..34dbfd24c 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -505,7 +505,7 @@ const char * linphone_account_creator_get_display_name(const LinphoneAccountCrea } LinphoneAccountCreatorEmailStatus linphone_account_creator_set_email(LinphoneAccountCreator *creator, const char *email) { - if (!is_matching_regex(email, "^.+@.+\\..*$")) { + if (!email || !is_matching_regex(email, "^.+@.+\\..*$")) { return LinphoneAccountCreatorEmailStatusMalformed; } if (!is_matching_regex(email, "^.+@.+\\.[A-Za-z]{2}[A-Za-z]*$")) {