summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PYPConfig.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc
index 24e5828..6cf5b33 100644
--- a/src/PYPConfig.cc
+++ b/src/PYPConfig.cc
@@ -608,11 +608,13 @@ PinyinConfig::valueChanged (const std::string &schema_id,
m_auto_commit = normalizeGVariant (value, false);
else if (CONFIG_IMPORT_DICTIONARY == name) {
std::string filename = normalizeGVariant (value, std::string(""));
- LibPinyinBackEnd::instance ().importPinyinDictionary (filename.c_str ());
+ if (!filename.empty ())
+ LibPinyinBackEnd::instance ().importPinyinDictionary (filename.c_str ());
}
else if (CONFIG_EXPORT_DICTIONARY == name) {
std::string filename = normalizeGVariant (value, std::string(""));
- LibPinyinBackEnd::instance ().exportPinyinDictionary (filename.c_str ());
+ if (!filename.empty ())
+ LibPinyinBackEnd::instance ().exportPinyinDictionary (filename.c_str ());
}
else if (CONFIG_CLEAR_USER_DATA == name) {
std::string target = normalizeGVariant (value, std::string(""));