diff options
author | Peng Wu <alexepico@gmail.com> | 2015-06-16 14:45:01 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-06-16 14:45:01 +0800 |
commit | c39c275789bbf065d3c0dcf766054c66fb9b9e9b (patch) | |
tree | f706733e61dd695326fafef92932a5156d44ed46 /src | |
parent | f0f32b8e86014a9173a25c01c333118392eb7004 (diff) | |
download | libpinyin-c39c275789bbf065d3c0dcf766054c66fb9b9e9b.tar.gz libpinyin-c39c275789bbf065d3c0dcf766054c66fb9b9e9b.tar.xz libpinyin-c39c275789bbf065d3c0dcf766054c66fb9b9e9b.zip |
fixes crash
Diffstat (limited to 'src')
-rw-r--r-- | src/pinyin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 76c5521..f036be4 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -514,6 +514,9 @@ bool pinyin_load_addon_phrase_library(pinyin_context_t * context, FacadePhraseIndex * phrase_index = context->m_addon_phrase_index; const pinyin_table_info_t * table_info = phrase_files + index; + if (NOT_USED == table_info->m_file_type) + return false; + /* Only DICTIONARY is allowed here. */ assert(DICTIONARY == table_info->m_file_type); |