Delete sequences
- From: Florian Boor <florian boor kernelconcepts de>
- To: tinymail-devel-list gnome org
- Subject: Delete sequences
- Date: Tue, 06 Jun 2006 13:28:33 +0200
Hi,
i just ran into a segfault deleting mails one after another (that means pressing
delete without changing the selection).
It looks like this is caused by dereferencing the header in
tny_list_iface_remove and using it afterwards - the attached patch just add some
sanity checks and changes the order of these operations. This seems to fix it
but i'm not really sure if this situation should occur at all.
Greetings
Florian
--
The dream of yesterday Florian Boor
is the hope of today Tel: +49 271-771091-14
and the reality of tomorrow. Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904] florian boor kernelconcepts de
1D78 2D4D 6C53 1CA4 5588 D07B A8E7 940C 25B7 9A76
Index: tinymail/tny-summary-window.c
===================================================================
--- tinymail/tny-summary-window.c (Revision 493)
+++ tinymail/tny-summary-window.c (Arbeitskopie)
@@ -243,11 +243,11 @@
(GTK_TREE_MODEL_SORT (model));
} else mymodel = model;
- tny_list_iface_remove (TNY_LIST_IFACE (mymodel), header);
-
folder = (TnyMsgFolderIface*)tny_msg_header_iface_get_folder (header);
tny_msg_folder_iface_remove_message (folder, header);
+ tny_list_iface_remove (TNY_LIST_IFACE (mymodel), header);
+
/* This demo-ui does not support hiding marked-as-deleted
messages. A normal deletion will only *mark* a message
as deleted. That way undeletion is still possible.
Index: libtinymailui-gtk/tny-msg-header-list-model.c
===================================================================
--- libtinymailui-gtk/tny-msg-header-list-model.c (Revision 493)
+++ libtinymailui-gtk/tny-msg-header-list-model.c (Arbeitskopie)
@@ -579,6 +579,9 @@
GtkTreePath *path;
GtkTreeIter iter;
+ g_return_if_fail (G_IS_OBJECT (item));
+ g_return_if_fail (G_IS_OBJECT (me));
+
iter.stamp = me->stamp;
iter.user_data = item;
path = tny_msg_header_list_model_get_path (GTK_TREE_MODEL (me), &iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]