diff --git a/du4/snake.c b/du4/snake.c index b67688f..4e2df6c 100644 --- a/du4/snake.c +++ b/du4/snake.c @@ -16,6 +16,8 @@ struct snake* add_snake(struct snake* snake,int x,int y){ struct snake* remove_snake(struct snake* snake){ + if (snake == NULL) return NULL; // valgrind chce na tento test reisenie + struct snake* clanok = snake; if (snake -> next == NULL) {