diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c
index dda4414be0c7cc258e0db0737f086bd33c3459bb..ff711c54134e6e798e7834e687ecd2fd89300629 100644
--- a/res/res_calendar_exchange.c
+++ b/res/res_calendar_exchange.c
@@ -246,7 +246,8 @@ static struct ast_str *generate_exchange_uuid(struct ast_str *uid)
 	struct ast_uuid *uuid = ast_uuid_generate();
 
 	if (!uuid) {
-		return NULL;
+		ast_str_set(&uid, 0, "%s", "");
+		return uid;
 	}
 
 	ast_str_set(&uid, 0, "%s", ast_uuid_to_str(uuid, buffer, AST_UUID_STR_LEN));