gtkhtml r8819 - trunk/components/editor
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r8819 - trunk/components/editor
- Date: Tue, 8 Apr 2008 13:42:52 +0100 (BST)
Author: mbarnes
Date: Tue Apr 8 13:42:52 2008
New Revision: 8819
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8819&view=rev
Log:
2008-04-08 Matthew Barnes <mbarnes redhat com>
** Fixes bug #526877, patch by Sankar P
* components/editor/gtkhtml-spell-language.c
(gtkhtml_spell_language_lookup):
Return NULL if there are no dictionaries available to avoid
an infinite loop.
* components/editor/gtkhtml-editor.c
(gtkhtml_editor_get_spell_languages):
Make sure we don't insert NULL into the returned list of
GtkhtmlSpellLanguages.
Modified:
trunk/components/editor/ChangeLog
trunk/components/editor/gtkhtml-editor.c
trunk/components/editor/gtkhtml-spell-language.c
Modified: trunk/components/editor/gtkhtml-editor.c
==============================================================================
--- trunk/components/editor/gtkhtml-editor.c (original)
+++ trunk/components/editor/gtkhtml-editor.c Tue Apr 8 13:42:52 2008
@@ -1177,6 +1177,8 @@
language_code = gtk_action_get_name (GTK_ACTION (action));
language = gtkhtml_spell_language_lookup (language_code);
+ if (language == NULL)
+ continue;
spell_languages = g_list_prepend (
spell_languages, (gpointer) language);
Modified: trunk/components/editor/gtkhtml-spell-language.c
==============================================================================
--- trunk/components/editor/gtkhtml-spell-language.c (original)
+++ trunk/components/editor/gtkhtml-spell-language.c Tue Apr 8 13:42:52 2008
@@ -346,6 +346,10 @@
available_languages = gtkhtml_spell_language_get_available ();
+ /* No dictionaries available? */
+ if (available_languages == NULL)
+ return NULL;
+
while (available_languages != NULL && language_code != NULL) {
GtkhtmlSpellLanguage *language = available_languages->data;
const gchar *code = language->code;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]