WHY AM I GETTING A SEGMENTATION FAULT

#define MAX_NAME 32     // Max username and profile_pic filename lengths
#define MAX_FRIENDS 10  // Max number of friends a user can have

typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;

int print_user(const User *user) {
    if (user == NULL) {
        return 1;
    } else {

        // Print the profile_pic
        FILE *profile_pic;
        profile_pic = fopen(user->profile_pic, "r");
        char line[100];

        if (profile_pic != NULL) {
            while (fgets(line, 100, profile_pic) != NULL) {
                printf("%s", line);
            }
        }
        fclose(profile_pic);

        // Prints the name
        printf("\nName: %s\n", user->name);
        printf("------------------------------------------\n");
            
        // Prints the friends
        printf("Friends:\n");
        for (int i=0; i < MAX_FRIENDS; i++) {
            if (user->friends[i] != NULL) {
                printf("%s\n", user->friends[i]->name);
            }
        }
        printf("------------------------------------------\n");

        return 0;
    }
}