[file-roller] Crash when pasting a deleted file
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Crash when pasting a deleted file
- Date: Sun, 25 Nov 2012 17:36:08 +0000 (UTC)
commit 9f4b95c927f01623ada620d16adadade48c71fa4
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Nov 25 18:32:45 2012 +0100
Crash when pasting a deleted file
[bug #688627]
src/fr-window.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index e9885a4..a7f6953 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -459,6 +459,7 @@ fr_window_clipboard_remove_file_list (FrWindow *window,
if (window->priv->copy_data->files == NULL) {
fr_clipboard_data_unref (window->priv->copy_data);
window->priv->copy_data = NULL;
+ gtk_clipboard_clear (gtk_widget_get_clipboard (GTK_WIDGET (window), FR_CLIPBOARD));
}
}
@@ -4275,6 +4276,9 @@ get_selection_data_from_clipboard_data (FrWindow *window,
char *uri;
GList *scan;
+ if (data == NULL)
+ return NULL;
+
list = g_string_new (NULL);
uri = g_file_get_uri (fr_archive_get_file (window->archive));
@@ -8270,12 +8274,14 @@ fr_clipboard_get (GtkClipboard *clipboard,
return;
data = get_selection_data_from_clipboard_data (window, window->priv->copy_data);
- gtk_selection_data_set (selection_data,
- gtk_selection_data_get_target (selection_data),
- 8,
- (guchar *) data,
- strlen (data));
- g_free (data);
+ if (data != NULL) {
+ gtk_selection_data_set (selection_data,
+ gtk_selection_data_get_target (selection_data),
+ 8,
+ (guchar *) data,
+ strlen (data));
+ g_free (data);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]