summaryrefslogtreecommitdiffstats
path: root/src/ZYLibZhuyin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ZYLibZhuyin.cc')
-rw-r--r--src/ZYLibZhuyin.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ZYLibZhuyin.cc b/src/ZYLibZhuyin.cc
index 9fa46cb..11149b9 100644
--- a/src/ZYLibZhuyin.cc
+++ b/src/ZYLibZhuyin.cc
@@ -197,6 +197,9 @@ LibZhuyinBackEnd::importZhuyinDictionary (const char * filename)
gboolean
LibZhuyinBackEnd::clearZhuyinUserData (const char * target)
{
+ if (NULL == m_zhuyin_context)
+ return FALSE;
+
if (0 == strcmp ("all", target))
zhuyin_mask_out (m_zhuyin_context, 0x0, 0x0);
else if (0 == strcmp ("user", target))