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]*$")) {