diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-27 19:49:25 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-27 19:49:25 +0100 |
commit | 56dbc215666f0c0e5bdf316aab31db9b42b6920d (patch) | |
tree | a270fca4a9af19c851f81b952823ffeef784e720 | |
parent | 57845ced52f6a6e0fb97278bd9e9541fdce487c2 (diff) | |
download | nx-libs-56dbc215666f0c0e5bdf316aab31db9b42b6920d.tar.gz nx-libs-56dbc215666f0c0e5bdf316aab31db9b42b6920d.tar.bz2 nx-libs-56dbc215666f0c0e5bdf316aab31db9b42b6920d.zip |
nxcomp/src/Log.h: make sure we don't pass NULL pointers to strstr().
-rw-r--r-- | nxcomp/src/Log.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nxcomp/src/Log.h b/nxcomp/src/Log.h index 9781ec8b2..d0ea627fa 100644 --- a/nxcomp/src/Log.h +++ b/nxcomp/src/Log.h @@ -509,7 +509,14 @@ bool has_newline(T value) template <char*> static bool has_newline(char *value) { - return strstr(value, "\n") != NULL; + if (value) + { + return strstr(value, "\n") != NULL; + } + else + { + return false; + } } template <char> |