diff options
Diffstat (limited to 'tests/test_chewing.cpp')
-rw-r--r-- | tests/test_chewing.cpp | 3 |
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); |