Commit 56dbc215 authored by Mihai Moldovan's avatar Mihai Moldovan

nxcomp/src/Log.h: make sure we don't pass NULL pointers to strstr().

parent 57845ced
...@@ -509,7 +509,14 @@ bool has_newline(T value) ...@@ -509,7 +509,14 @@ bool has_newline(T value)
template <char*> template <char*>
static bool has_newline(char *value) static bool has_newline(char *value)
{ {
return strstr(value, "\n") != NULL; if (value)
{
return strstr(value, "\n") != NULL;
}
else
{
return false;
}
} }
template <char> template <char>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment