diff --git a/ft_lstlast_bonus.c b/ft_lstlast_bonus.c index a53955f..8c402f0 100644 --- a/ft_lstlast_bonus.c +++ b/ft_lstlast_bonus.c @@ -6,7 +6,7 @@ /* By: kcolin +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/21 12:03:16 by kcolin #+# #+# */ -/* Updated: 2024/10/21 12:04:50 by kcolin ### ########.fr */ +/* Updated: 2024/10/21 13:16:06 by kcolin ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,8 @@ t_list *ft_lstlast(t_list *lst) { t_list *current; + if (lst == NULL) + return (NULL); current = lst; while (current->next != NULL) {