Attempt to fix environment related crash

Fixes #89
This commit is contained in:
Nicolas Viennot 2016-06-14 13:46:15 -04:00
parent b27f3bacc0
commit 608763a41a

View File

@ -307,6 +307,10 @@ cmd_string_variable(const char *s, size_t *p)
free(buf);
if (envent == NULL)
return (xstrdup(""));
#ifdef TMATE
if (envent->value == NULL)
return (xstrdup(""));
#endif
return (xstrdup(envent->value));
error: