diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-04 19:25:57 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-04 21:04:06 +0100 |
commit | 783c99516a92faced0d2d5b030ef862d64b19c48 (patch) | |
tree | 8141b383e4ba9d2301fa7b239b50dcd9b0135cfa /AK/LogStream.h | |
parent | 028c011760b5b665fc2a72bb3c11fd3a6ca60d2c (diff) | |
download | serenity-783c99516a92faced0d2d5b030ef862d64b19c48.zip |
AK: LogStream should handle being passed a null const char*
Diffstat (limited to 'AK/LogStream.h')
-rw-r--r-- | AK/LogStream.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/LogStream.h b/AK/LogStream.h index e0fa4e9ce3..63e728d960 100644 --- a/AK/LogStream.h +++ b/AK/LogStream.h @@ -85,6 +85,8 @@ public: inline const LogStream& operator<<(const LogStream& stream, const char* value) { + if (!value) + return stream << "(null)"; int length = 0; const char* p = value; while (*(p++)) |