mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
[putenv_term] don't dereference NULL when lacking TERM variable #1348
This commit is contained in:
parent
5010911a08
commit
51043fc959
@ -1210,7 +1210,7 @@ int putenv_term(const char* termname){
|
||||
}else{
|
||||
loginfo("provided %s value %s\n", ENVVAR, termname);
|
||||
}
|
||||
if(strcmp(oldterm, termname) == 0){
|
||||
if(oldterm && strcmp(oldterm, termname) == 0){
|
||||
return 0;
|
||||
}
|
||||
char* buf = malloc(strlen(termname) + strlen(ENVVAR) + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user