summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-02-13 16:50:10 +0800
committerPeng Wu <alexepico@gmail.com>2017-02-13 16:50:10 +0800
commit3e2c49c93e302ab6a3b0d4a6e4f8291ede39844a (patch)
treea8f5e981cb5d222eb25f1f311e66bd5c8313dbfa
parent114e9dc802ea243925ce9e19e0ce4e2d83356ac5 (diff)
downloadlibpinyin-3e2c49c93e302ab6a3b0d4a6e4f8291ede39844a.zip
libpinyin-3e2c49c93e302ab6a3b0d4a6e4f8291ede39844a.tar.gz
libpinyin-3e2c49c93e302ab6a3b0d4a6e4f8291ede39844a.tar.xz
fixes crash
-rw-r--r--src/pinyin.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 330ab19..1a5132e 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1172,12 +1172,6 @@ bool pinyin_get_sentence(pinyin_instance_t * instance,
pinyin_context_t * & context = instance->m_context;
NBestMatchResults & results = instance->m_nbest_results;
- /* check the candidate type. */
- CandidateVector candidates = instance->m_candidates;
- lookup_candidate_t * candidate = &g_array_index
- (candidates, lookup_candidate_t, index);
- assert(NBEST_MATCH_CANDIDATE == candidate->m_candidate_type);
-
MatchResult result = NULL;
assert(index < results.size());
assert(results.get_result(index, result));
@@ -2065,12 +2059,6 @@ bool pinyin_train(pinyin_instance_t * instance, guint8 index){
PhoneticKeyMatrix & matrix = instance->m_matrix;
NBestMatchResults & results = instance->m_nbest_results;
- /* check the candidate type. */
- CandidateVector candidates = instance->m_candidates;
- lookup_candidate_t * candidate = &g_array_index
- (candidates, lookup_candidate_t, index);
- assert(NBEST_MATCH_CANDIDATE == candidate->m_candidate_type);
-
context->m_modified = true;
MatchResult result = NULL;