summaryrefslogtreecommitdiffstats
path: root/src/ZYZPinyinEditor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ZYZPinyinEditor.cc')
-rw-r--r--src/ZYZPinyinEditor.cc3
1 files changed, 2 insertions, 1 deletions
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);