Do not compare car if it is null

This commit is contained in:
Paul Dino Jones 2024-09-08 18:44:21 -04:00
parent d1629dfcbd
commit 55dfa4b086
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ int getconfigtouse(const char* config_file_str, char* car, int sim)
slogt("checking if car is matched %i", j); slogt("checking if car is matched %i", j);
temp = NULL; temp = NULL;
found = config_setting_lookup_string(config_config, "car", &temp); found = config_setting_lookup_string(config_config, "car", &temp);
if(temp != NULL && found > 0) if(temp != NULL && found > 0 && car != NULL)
{ {
if(strcicmp(temp, car) == 0) if(strcicmp(temp, car) == 0)
{ {