aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-24 05:09:03 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-24 05:09:03 +0800
commit8aecd161b7dfd5fafa24702610bc3c930928ec22 (patch)
treef0be5e822e0a9b8119b91a6d1ff94670f168fb03
parent76f3bb1c4fcc41ff194174a015695c9673210308 (diff)
downloadgsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.tar
gsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.tar.gz
gsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.tar.bz2
gsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.tar.lz
gsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.tar.xz
gsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.tar.zst
gsoc2013-evolution-8aecd161b7dfd5fafa24702610bc3c930928ec22.zip
[Fix #5736, crashing when copying a message with drag and drop.]
* e-storage-set-view.c (tree_drag_data_received): Handle NULL data gracefully. svn path=/trunk/; revision=12422
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-storage-set-view.c12
2 files changed, 17 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 149d021697..20e61bc9d7 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-23 Ettore Perazzoli <ettore@ximian.com>
+
+ [Fix #5736, crashing when copying a message with drag and drop.]
+
+ * e-storage-set-view.c (tree_drag_data_received): Handle NULL data
+ gracefully.
+
2001-08-22 Ettore Perazzoli <ettore@ximian.com>
* e-storage.c (e_storage_async_xfer_folder): If the remove_source
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index a49e00f3bb..8ea0b59318 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -1275,8 +1275,16 @@ tree_drag_data_received (ETree *etree,
corba_data.target = selection_data->target;
corba_data.bytes._release = FALSE;
- corba_data.bytes._length = selection_data->length;
- corba_data.bytes._buffer = selection_data->data;
+
+ if (selection_data->data == NULL) {
+ /* If data is NULL the length is -1 and this would mess things
+ up so we handle it separately. */
+ corba_data.bytes._length = 0;
+ corba_data.bytes._buffer = NULL;
+ } else {
+ corba_data.bytes._length = selection_data->length;
+ corba_data.bytes._buffer = selection_data->data;
+ }
/* pass off the data to the component's DestinationFolderInterface */
handled = GNOME_Evolution_ShellComponentDnd_DestinationFolder_handleDrop (destination_folder_interface,