aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-24 22:29:13 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-24 22:29:13 -0700
commit76f7d76dfb68b5e4b7bfe1395e80cc2c0ca38d3c (patch)
treedff736e1492236d4a8165e4580ac59cc637fd989 /src
parente47d21028b95cb907f2cf0dce46c34024ee1b90c (diff)
Fixed crash
Diffstat (limited to 'src')
-rw-r--r--src/core/basetypes/MCString.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/basetypes/MCString.cc b/src/core/basetypes/MCString.cc
index 0e862067..a90a32b3 100644
--- a/src/core/basetypes/MCString.cc
+++ b/src/core/basetypes/MCString.cc
@@ -690,7 +690,9 @@ String::String(const UChar * unicodeChars)
{
mUnicodeChars = NULL;
reset();
- allocate(u_strlen(unicodeChars));
+ if (unicodeChars != NULL) {
+ allocate(u_strlen(unicodeChars));
+ }
appendCharacters(unicodeChars);
}