[gedit] spell: fix critical message when no dictionaries installed
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] spell: fix critical message when no dictionaries installed
- Date: Wed, 6 Apr 2016 09:22:20 +0000 (UTC)
commit e5a6c59ea4579c22e8600fbe3ecf09abd3570d7f
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Apr 6 11:18:55 2016 +0200
spell: fix critical message when no dictionaries installed
plugins/spell/gedit-spell-plugin.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index dc430dd..06af123 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -482,7 +482,13 @@ on_document_saved (GeditDocument *doc,
if (checker != NULL)
{
- language_code = gspell_language_get_code (gspell_checker_get_language (checker));
+ const GspellLanguage *lang;
+
+ lang = gspell_checker_get_language (checker);
+ if (lang != NULL)
+ {
+ language_code = gspell_language_get_code (lang);
+ }
}
tab = gedit_tab_get_from_document (doc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]