summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-stream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/core/slang-stream.h b/source/core/slang-stream.h
index a62c18838..8459d53d1 100644
--- a/source/core/slang-stream.h
+++ b/source/core/slang-stream.h
@@ -138,7 +138,7 @@ public:
void setContent(const void* contents, size_t contentsSize)
{
m_ownedContents.setCount(contentsSize);
- if (contentsSize > 0)
+ if (contents != nullptr)
{
::memcpy(m_ownedContents.getBuffer(), contents, contentsSize);
}