From ffb24a97f700e24a944e5df1bf2b0369a6c73ab5 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Tue, 29 Jul 2014 15:10:19 +0200 Subject: EHTMLEditorSpellCheckDialog - Avoid crash when no iter was set in the dictionaries combo box --- e-util/e-html-editor-spell-check-dialog.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'e-util/e-html-editor-spell-check-dialog.c') diff --git a/e-util/e-html-editor-spell-check-dialog.c b/e-util/e-html-editor-spell-check-dialog.c index d391860fb0..5d632a1290 100644 --- a/e-util/e-html-editor-spell-check-dialog.c +++ b/e-util/e-html-editor-spell-check-dialog.c @@ -400,15 +400,16 @@ html_editor_spell_check_dialog_set_dictionary (EHTMLEditorSpellCheckDialog *dial ESpellDictionary *dictionary; combo_box = GTK_COMBO_BOX (dialog->priv->dictionary_combo); - gtk_combo_box_get_active_iter (combo_box, &iter); - model = gtk_combo_box_get_model (combo_box); + if (gtk_combo_box_get_active_iter (combo_box, &iter)) { + model = gtk_combo_box_get_model (combo_box); - gtk_tree_model_get (model, &iter, 1, &dictionary, -1); + gtk_tree_model_get (model, &iter, 1, &dictionary, -1); - dialog->priv->current_dict = dictionary; + dialog->priv->current_dict = dictionary; - /* Update suggestions */ - html_editor_spell_check_dialog_set_word (dialog, dialog->priv->word); + /* Update suggestions */ + html_editor_spell_check_dialog_set_word (dialog, dialog->priv->word); + } } static void -- cgit v1.2.3