summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_wstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_basic_wstring.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index 09e64e0c72..3c54ca983e 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -34,6 +34,9 @@ CFX_WideString::StringData* CFX_WideString::StringData::Create(int nLen)
FXSYS_assert(usableLen >= nLen);
void* pData = FX_Alloc(FX_BYTE, iSize.ValueOrDie());
+ if (!pData) {
+ return NULL;
+ }
return new (pData) StringData(nLen, usableLen);
}
CFX_WideString::~CFX_WideString()