diff options
-rw-r--r-- | src/PYLibPinyin.cc | 3 |
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) |