From f3c8681da3073cf40f2f53e24c324a8072c13683 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 18 Jun 2014 14:43:41 +0800 Subject: fixes crash --- src/ZYZPinyinEditor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ZYZPinyinEditor.cc') diff --git a/src/ZYZPinyinEditor.cc b/src/ZYZPinyinEditor.cc index dd4adf7..0416b85 100644 --- a/src/ZYZPinyinEditor.cc +++ b/src/ZYZPinyinEditor.cc @@ -134,7 +134,8 @@ PinyinEditor::updatePreeditText (void) char * sentence = NULL; zhuyin_get_sentence (instance, &sentence); - m_preedit_text += sentence; + if (sentence) + m_preedit_text += sentence; g_free (sentence); size_t len = zhuyin_get_parsed_input_length (instance); -- cgit