From e11f37f2fcaba74949b30a7b2181916da2a9c9a1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 25 Feb 2009 11:23:33 +0000 Subject: ** Fix for bug #572399 2009-02-25 Milan Crha ** 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 --- plugins/email-custom-header/ChangeLog | 7 +++++++ plugins/email-custom-header/email-custom-header.c | 13 +++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/email-custom-header/ChangeLog b/plugins/email-custom-header/ChangeLog index b10181369b..f826eddd86 100644 --- a/plugins/email-custom-header/ChangeLog +++ b/plugins/email-custom-header/ChangeLog @@ -1,3 +1,10 @@ +2009-02-25 Milan Crha + + ** Fix for bug #572399 + + * email-custom-header.c: (header_foreach_check_isempty): + Do not read from invalid iterator after call of row changed. + 2009-02-13 Milan Crha ** Fixes part of bug #564229 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); -- cgit v1.2.3