summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_widestring.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_widestring.h')
-rw-r--r--core/fxcrt/cfx_widestring.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/cfx_widestring.h b/core/fxcrt/cfx_widestring.h
index d57e47c62f..f9e800d0a2 100644
--- a/core/fxcrt/cfx_widestring.h
+++ b/core/fxcrt/cfx_widestring.h
@@ -101,9 +101,9 @@ class CFX_WideString {
bool operator<(const CFX_WideString& str) const;
- const CharType& operator[](const FX_STRSIZE index) const {
+ CharType operator[](const FX_STRSIZE index) const {
ASSERT(index >= 0 && index < GetLength());
- return m_pData->m_String[index];
+ return m_pData ? m_pData->m_String[index] : 0;
}
void SetAt(FX_STRSIZE index, wchar_t c);