summaryrefslogtreecommitdiffstats
path: root/src/PYLibPinyin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/PYLibPinyin.cc')
-rw-r--r--src/PYLibPinyin.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc
index 34e2424..c27dd2a 100644
--- a/src/PYLibPinyin.cc
+++ b/src/PYLibPinyin.cc
@@ -291,6 +291,9 @@ LibPinyinBackEnd::exportPinyinDictionary (const char *filename)
gboolean
LibPinyinBackEnd::clearPinyinUserData (const char *target)
{
+ if (NULL == m_pinyin_context)
+ return FALSE;
+
if (0 == strcmp ("all", target)) {
pinyin_mask_out (m_pinyin_context, 0x0, 0x0);
} else if (0 == strcmp ("user", target)) {