temporarily work around ngseg
authorPeng Wu <alexepico@gmail.com>
Mon, 18 Jul 2011 06:48:46 +0000 (14:48 +0800)
committerPeng Wu <alexepico@gmail.com>
Mon, 18 Jul 2011 06:53:09 +0000 (14:53 +0800)
utils/segment/ngseg.cpp

index 7bfc8c1..c4853df 100644 (file)
@@ -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;