snake null
This commit is contained in:
parent
c141e7e44e
commit
32d35323f9
@ -13,6 +13,9 @@ struct snake* add_snake(struct snake* snake,int x,int y){
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct snake* remove_snake(struct snake* snake){
|
struct snake* remove_snake(struct snake* snake){
|
||||||
|
if (snake == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
struct snake* nova_hlavicka = snake->next;
|
struct snake* nova_hlavicka = snake->next;
|
||||||
free(snake);
|
free(snake);
|
||||||
|
Loading…
Reference in New Issue
Block a user