summaryrefslogtreecommitdiffstats
path: root/tests/test_chewing.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-30 12:46:39 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-30 14:16:34 +0800
commit38fcc9ae1cbfe81cc52c4e076159047119cd0865 (patch)
treef2726709c6f6f1d42ab2817fdc612be61ad820bd /tests/test_chewing.cpp
parent47dca981b4d0f155f80087ee892bd2ff80429e7c (diff)
downloadlibpinyin-38fcc9ae1cbfe81cc52c4e076159047119cd0865.tar.gz
libpinyin-38fcc9ae1cbfe81cc52c4e076159047119cd0865.tar.xz
libpinyin-38fcc9ae1cbfe81cc52c4e076159047119cd0865.zip
fixes test chewing0.3.x
Diffstat (limited to 'tests/test_chewing.cpp')
-rw-r--r--tests/test_chewing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 4d3a054..2a2674e 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -46,7 +46,8 @@ int main(int argc, char * argv[]){
char * sentence = NULL;
pinyin_get_sentence (instance, &sentence);
- printf("%s\n", sentence);
+ if (sentence)
+ printf("%s\n", sentence);
g_free(sentence);
pinyin_train(instance);