mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 13:02:35 +00:00
Added a null check to TERM_PROGRAM environment variable check.
This commit is contained in:
parent
9ee2d4442b
commit
1d1c3a18bd
@ -77,7 +77,11 @@ static bool customColorsSupported() {
|
||||
#ifdef WIN32
|
||||
return true;
|
||||
#else
|
||||
std::string term = std::string(std::getenv("TERM_PROGRAM"));
|
||||
const char* termEnv = std::getenv("TERM_PROGRAM");
|
||||
std::string term;
|
||||
if (termEnv && strlen(termEnv)) {
|
||||
term = std::string(termEnv);
|
||||
}
|
||||
return term != "Apple_Terminal";
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user