summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/core/slang-string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index 9f6eaafa7..cec4b0a09 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -72,7 +72,7 @@ namespace Slang
explicit UnownedStringSlice(char const* a) :
m_begin(a),
- m_end(a + strlen(a))
+ m_end(a ? a + strlen(a) : nullptr)
{}
UnownedStringSlice(char const* b, char const* e)
: m_begin(b)