diff options
-rw-r--r-- | utils/segment/ngseg.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp index 7bfc8c1..c4853df 100644 --- a/utils/segment/ngseg.cpp +++ b/utils/segment/ngseg.cpp @@ -67,7 +67,8 @@ bool deal_with_segmentable(GArray * current_utf16){ printf("\n"); #endif g_phrase_lookup->convert_to_utf8(results, "\n", result_string); - printf("%s\n", result_string); + if (result_string) + printf("%s\n", result_string); g_array_free(results, TRUE); g_free(result_string); return true; |