commit c70fdc703c0755981246a18361ed7ff10ba6ea06
parent 69280de2bdac08583974f8a628cab3a399ebe890
Author: Colin Leroy <colin@colino.net>
Date: Tue, 2 Oct 2018 16:27:41 +0200
Fix Coverity #1372351
Diffstat:
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/src/folderview.c b/src/folderview.c
@@ -3179,23 +3179,21 @@ static void folderview_drag_received_cb(GtkWidget *widget,
src_item && src_item != item && FOLDER_CLASS(item->folder)->copy_msg != NULL)) {
return;
}
- if (item && src_item) {
- switch (gdk_drag_context_get_selected_action(drag_context)) {
- case GDK_ACTION_COPY:
+
+ switch (gdk_drag_context_get_selected_action(drag_context)) {
+ case GDK_ACTION_COPY:
+ summary_copy_selected_to(folderview->summaryview, item);
+ gtk_drag_finish(drag_context, TRUE, FALSE, time);
+ break;
+ case GDK_ACTION_MOVE:
+ case GDK_ACTION_DEFAULT:
+ default:
+ if (FOLDER_CLASS(src_item->folder)->remove_msg == NULL)
summary_copy_selected_to(folderview->summaryview, item);
- gtk_drag_finish(drag_context, TRUE, FALSE, time);
- break;
- case GDK_ACTION_MOVE:
- case GDK_ACTION_DEFAULT:
- default:
- if (FOLDER_CLASS(src_item->folder)->remove_msg == NULL)
- summary_copy_selected_to(folderview->summaryview, item);
- else
- summary_move_selected_to(folderview->summaryview, item);
- gtk_drag_finish(drag_context, TRUE, TRUE, time);
- }
- } else
- gtk_drag_finish(drag_context, FALSE, FALSE, time);
+ else
+ summary_move_selected_to(folderview->summaryview, item);
+ gtk_drag_finish(drag_context, TRUE, TRUE, time);
+ }
} else {
/* comes from folderview */
char *source;