aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/email-custom-header/email-custom-header.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-02-25 19:23:33 +0800
committerMilan Crha <mcrha@src.gnome.org>2009-02-25 19:23:33 +0800
commite11f37f2fcaba74949b30a7b2181916da2a9c9a1 (patch)
tree58a2d2b3488e78803f7e888a2962eccbdd7ed116 /plugins/email-custom-header/email-custom-header.c
parent610cdfa9fd132feda1398c778d5c11643cd6618e (diff)
downloadgsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.tar
gsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.tar.gz
gsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.tar.bz2
gsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.tar.lz
gsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.tar.xz
gsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.tar.zst
gsoc2013-evolution-e11f37f2fcaba74949b30a7b2181916da2a9c9a1.zip
** Fix for bug #572399
2009-02-25 Milan Crha <mcrha@redhat.com> ** Fix for bug #572399 * email-custom-header.c: (header_foreach_check_isempty): Do not read from invalid iterator after call of row changed. svn path=/trunk/; revision=37331
Diffstat (limited to 'plugins/email-custom-header/email-custom-header.c')
-rw-r--r--plugins/email-custom-header/email-custom-header.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c
index 233804cd13..994af730b6 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -684,12 +684,13 @@ header_foreach_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIte
signal (if we delete the row, then the iter gets corrupted) */
if ((keyword) && !(g_utf8_strlen (g_strstrip (keyword), -1) > 0))
gtk_tree_model_row_changed (model, path, iter);
-
- gtk_tree_model_get (model, iter, HEADER_VALUE_COLUMN, &value, -1);
- /* Check if the keyword is not empty and then emit the row-changed
- signal (if we delete the row, then the iter gets corrupted) */
- if ((value) && !(g_utf8_strlen (g_strstrip (value), -1) > 0))
- gtk_tree_model_row_changed (model, path, iter);
+ else {
+ gtk_tree_model_get (model, iter, HEADER_VALUE_COLUMN, &value, -1);
+ /* Check if the keyword is not empty and then emit the row-changed
+ signal (if we delete the row, then the iter gets corrupted) */
+ if ((value) && !(g_utf8_strlen (g_strstrip (value), -1) > 0))
+ gtk_tree_model_row_changed (model, path, iter);
+ }
g_free (keyword);
g_free (value);