[gedit/wip/spell-checking] spell-checker: limit the damage if the API is not correctly used
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/spell-checking] spell-checker: limit the damage if the API is not correctly used
- Date: Fri, 7 Aug 2015 16:08:02 +0000 (UTC)
commit a44ac7818e7b85e6f4ff396979e5fb3d3abcb764
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Aug 7 18:06:34 2015 +0200
spell-checker: limit the damage if the API is not correctly used
plugins/spell/gedit-spell-checker.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-checker.c b/plugins/spell/gedit-spell-checker.c
index 305a275..901123a 100644
--- a/plugins/spell/gedit-spell-checker.c
+++ b/plugins/spell/gedit-spell-checker.c
@@ -441,7 +441,9 @@ gedit_spell_checker_check_word (GeditSpellChecker *checker,
g_return_val_if_fail (GEDIT_IS_SPELL_CHECKER (checker), FALSE);
g_return_val_if_fail (word != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- g_return_val_if_fail (is_language_set (checker), FALSE);
+
+ /* If no dictionaries are available, limit the damage by returning TRUE. */
+ g_return_val_if_fail (is_language_set (checker), TRUE);
priv = gedit_spell_checker_get_instance_private (checker);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]