From f89a13948857907067abb5e80eaa8922a1568435 Mon Sep 17 00:00:00 2001 From: honcheng Date: Tue, 3 Jun 2014 17:16:09 -0700 Subject: Fixed crash when stringWithDetectedCharset in MCData returns NULL for Japanese text encoding. --- src/core/basetypes/MCData.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/basetypes') diff --git a/src/core/basetypes/MCData.cc b/src/core/basetypes/MCData.cc index 0a03316c..60b8ff8f 100644 --- a/src/core/basetypes/MCData.cc +++ b/src/core/basetypes/MCData.cc @@ -283,6 +283,9 @@ String * Data::stringWithDetectedCharset(String * hintCharset, bool isHTML) if (result == NULL) { result = data->stringWithCharset("iso-2022-jp"); } + if (result == NULL) { + result = MCSTR(""); + } return result; } -- cgit v1.2.3