summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PYLibPinyin.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc
index 5180164..d4f47c0 100644
--- a/src/PYLibPinyin.cc
+++ b/src/PYLibPinyin.cc
@@ -335,6 +335,9 @@ LibPinyinBackEnd::exportBigramPhrase (FILE *dictfile)
gboolean
LibPinyinBackEnd::exportPinyinDictionary (const char *filename)
{
+ if (NULL == m_pinyin_context)
+ return FALSE;
+
/* user phrase library should be already loaded here. */
FILE * dictfile = fopen (filename, "w");
if (NULL == dictfile)