aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-29 21:10:19 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-29 21:10:19 +0800
commitffb24a97f700e24a944e5df1bf2b0369a6c73ab5 (patch)
tree893e505b64e9d153aadabae71da833e77f6541cc
parent0cbe54fcffbf124b5af0ede1f8438a13ee58f7a1 (diff)
downloadgsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.tar
gsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.tar.gz
gsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.tar.bz2
gsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.tar.lz
gsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.tar.xz
gsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.tar.zst
gsoc2013-evolution-ffb24a97f700e24a944e5df1bf2b0369a6c73ab5.zip
EHTMLEditorSpellCheckDialog - Avoid crash when no iter was set in the dictionaries combo box
-rw-r--r--e-util/e-html-editor-spell-check-dialog.c13
1 files changed, 7 insertions, 6 deletions
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