Don't try to call strlen() on a null string.

This commit is contained in:
mcmullen%netscape.com 1999-06-10 02:24:21 +00:00
parent 8e75c8bbe4
commit 2a3a60880a

View File

@ -129,7 +129,8 @@ nsOutputStream& nsOutputStream::operator << (char c)
nsOutputStream& nsOutputStream::operator << (const char* s)
//----------------------------------------------------------------------------------------
{
write(s, strlen(s));
if (s)
write(s, strlen(s));
return *this;
}