diff --git a/cv9/snake.c b/cv9/snake.c index 8237939..b33b25f 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -13,7 +13,10 @@ struct snake* add_snake(struct snake* snake,int x,int y){ } struct snake* remove_snake(struct snake* snake){ - + if (snake == NULL) { + return NULL; + } + struct snake* nova_hlavicka = snake->next; free(snake);