** 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
This commit is contained in:
Milan Crha
2009-02-25 11:23:33 +00:00
committed by Milan Crha
parent 610cdfa9fd
commit e11f37f2fc
2 changed files with 14 additions and 6 deletions

View File

@ -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);