Why segmentation fault ?

int delete_user(const char *name, User **user_ptr_del) {
    User *user_ptr = find_user(name, *user_ptr_del);
    if(user_ptr == NULL) {
        return 1;
    }

    User *curr_usr = user_ptr_del[0];
    if(curr_usr->next == NULL) {
        curr_usr = NULL;
    } else {
    while (strcmp(curr_usr->next->name, name) != 0) {
        curr_usr = curr_usr->next;
    }
    curr_usr->next = curr_usr->next->next;
    }

    int i = 0;
    while(i <= 10 && user_ptr->friends[i] != NULL) {
        User *curr_friend_ptr = user_ptr->friends[i];
        int j = 0;
        while(strcmp(curr_friend_ptr->friends[j]->name, user_ptr->name) != 0) {
            j += 1;
        }
        for(int k = j;k<10;k++) {
            if(curr_friend_ptr->friends[k] != NULL) {
                curr_friend_ptr->friends[k] = curr_friend_ptr->friends[k+1];
            }
        }
        i += 1;
    }
    return 0;
}