From 3a019b60f234ade31b3cd134880c2f94c79ddf9c Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 12:21:37 +0100 Subject: [PATCH] add --- cv5/a_train.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cv5/a_train.c b/cv5/a_train.c index 570c209..b6d2b6a 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -11,6 +11,9 @@ struct car* add_car(struct car* first,const char* target) { if(first == NULL){ return newcar; } + if(target == NULL){ + return NULL; + } struct car *this = first; while(this->next != NULL){ this = this->next;