From c39c275789bbf065d3c0dcf766054c66fb9b9e9b Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 16 Jun 2015 14:45:01 +0800 Subject: fixes crash --- src/pinyin.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit