Index: gtkhtml-spell-language.c
===================================================================
--- gtkhtml-spell-language.c	(revision 8816)
+++ gtkhtml-spell-language.c	(working copy)
@@ -346,6 +346,9 @@ gtkhtml_spell_language_lookup (const gch
 
 	available_languages = gtkhtml_spell_language_get_available ();
 
+	if (!available_languages)
+		return NULL;
+
 	while (available_languages != NULL && language_code != NULL) {
 		GtkhtmlSpellLanguage *language = available_languages->data;
 		const gchar *code = language->code;
