From c4873c80ffb34e6c4456d9f2b571c612af08ad71 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 21 Sep 2011 14:36:28 +0800 Subject: fixes test pinyin --- tests/test_pinyin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp index b8d8152..31aec84 100644 --- a/tests/test_pinyin.cpp +++ b/tests/test_pinyin.cpp @@ -45,7 +45,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); -- cgit