Check NULL pointer to avoid SIGSEGV

This commit is contained in:
David Xu 2002-12-24 07:40:10 +00:00
parent 11a2911cec
commit 71f2362aa4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108254

View File

@ -450,7 +450,8 @@ MCReadCat(int fd)
static void
printS(int fd, const char *str)
{
write(fd, str, strlen(str));
if (str)
write(fd, str, strlen(str));
}
static void