[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
This commit is contained in:
Ettore Perazzoli
2001-08-23 21:09:03 +00:00
parent 76f3bb1c4f
commit 8aecd161b7
2 changed files with 17 additions and 2 deletions

View File

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

View File

@ -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,