[file-roller] Fixed crash when clicking Cancel in Add Files
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Fixed crash when clicking Cancel in Add Files
- Date: Wed, 6 Oct 2010 07:29:44 +0000 (UTC)
commit 77e9b777042c557c961f058ecab2691a4fd19a62
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Oct 6 09:24:36 2010 +0200
Fixed crash when clicking Cancel in Add Files
[bug #631472]
src/dlg-add-files.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c
index b77e7b6..3219a23 100644
--- a/src/dlg-add-files.c
+++ b/src/dlg-add-files.c
@@ -65,11 +65,14 @@ file_sel_response_cb (GtkWidget *widget,
current_folder = gtk_file_chooser_get_current_folder_uri (file_sel);
uri = gtk_file_chooser_get_uri (file_sel);
- g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, current_folder);
- g_settings_set_string (data->settings, PREF_ADD_FILENAME, uri);
- fr_window_set_add_default_dir (window, current_folder);
-
- g_free (uri);
+ if (current_folder != NULL) {
+ g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, current_folder);
+ fr_window_set_add_default_dir (window, current_folder);
+ }
+ if (uri != NULL) {
+ g_settings_set_string (data->settings, PREF_ADD_FILENAME, uri);
+ g_free (uri);
+ }
if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
gtk_widget_destroy (data->dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]