Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-04-03 18:29:34 +0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-04-03 20:43:25 +0400
commit4ede1862dc62f4cac030a171099d8ec8a9b079ab (patch)
treec8905f303a00962b5ac395e4338613766906ef61 /libavutil
parent42ba1c51d9e843135772a3b9e5cf036a37b28bdb (diff)
log: Do not assume the TERM variable is always set
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 6522ef3607..af86eff70b 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -74,7 +74,7 @@ static void check_color_terminal(void)
char *term = getenv("TERM");
use_color = !getenv("NO_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR") &&
(getenv("TERM") && isatty(2) || getenv("AV_LOG_FORCE_COLOR"));
- use_color += !!strstr(term, "256color") ;
+ use_color += term && strstr(term, "256color");
#else
use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("NO_COLOR") &&
!getenv("AV_LOG_FORCE_NOCOLOR");