From a121dd4c6adfb3a13a3cf03260a49207dfd0fee7 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 5 Nov 2007 14:37:17 +0000 Subject: [PATCH] fix possible NULL dereference pmo-trunk-r3647 --- src/modest-ui-actions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 7c581bd..1943ffa 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -4187,7 +4187,11 @@ modest_ui_actions_on_main_window_remove_attachments (GtkAction *action, MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW); header_list = modest_header_view_get_selected_headers (MODEST_HEADER_VIEW (header_view)); - + if (!header_list) { + g_warning ("%s: no header selected", __FUNCTION__); + return; + } + if (tny_list_get_length (header_list) == 1) { iter = tny_list_create_iterator (header_list); header = TNY_HEADER (tny_iterator_get_current (iter)); -- 1.7.9.5