*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
*
* Authors: Martyn Russell <martyn@imendio.com>
* Richard Hult <richard@imendio.com>
enchant_broker_free_dict (lang->config, lang->speller);
enchant_broker_free (lang->config);
-
+
g_slice_free (SpellLanguage, lang);
}
lang->config = enchant_broker_init ();
lang->speller = enchant_broker_request_dict (lang->config, strv[i]);
- languages = g_list_append (languages, lang);
+ if (lang->speller == NULL) {
+ DEBUG ("language '%s' has no valid dict", strv[i]);
+ } else {
+ languages = g_list_append (languages, lang);
+ }
+
i++;
}
spell_setup_languages ();
if (!languages) {
- DEBUG ("No languages to check against");
return TRUE;
}
suggestions = enchant_dict_suggest (lang->speller, word, len,
&number_of_suggestions);
-
+
for (i = 0; i < number_of_suggestions; i++) {
suggestion_list = g_list_append (suggestion_list,
g_strdup (suggestions[i]));