From 1a88675516d9fd155d4055d13355c66b7d5757e6 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 7 Aug 2024 13:01:43 +0800 Subject: Fix LibPinyinBackEnd::exportPinyinDictionary method --- src/PYLibPinyin.cc | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit