aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nyancat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index 3cbca75..46b201e 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -364,7 +364,8 @@ int main(int argc, char ** argv) {
/* We are running standalone, retrieve the
* terminal type from the environment. */
char * nterm = getenv("TERM");
- strcpy(term, nterm);
+ if (nterm)
+ strcpy(term, nterm);
/* Also get the number of columns */
struct winsize w;