[gtk+] GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current fold
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current fold
- Date: Sat, 24 Jan 2015 22:29:10 +0000 (UTC)
commit 8fc920144bb1f9840e501ef4f470be2eb83b6c0a
Author: Christoph Reiter <reiter christoph gmail com>
Date: Tue Jan 20 17:54:03 2015 +0100
GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current folder.
Keep a reference to the widget while the async operation is ongoing.
https://bugzilla.gnome.org/show_bug.cgi?id=725164
gtk/gtkfilechooserwidget.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 100d43c..b0010c9 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -4286,6 +4286,7 @@ update_current_folder_mount_enclosing_volume_cb (GCancellable *cancellabl
change_folder_and_display_error (impl, data->file, data->clear_entry);
out:
+ g_object_unref (data->impl);
g_object_unref (data->file);
g_free (data);
@@ -4440,6 +4441,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
g_signal_emit_by_name (impl, "selection-changed", 0);
out:
+ g_object_unref (data->impl);
g_object_unref (data->file);
g_free (data);
@@ -4480,7 +4482,7 @@ gtk_file_chooser_widget_update_current_folder (GtkFileChooser *chooser,
/* Test validity of path here. */
data = g_new0 (struct UpdateCurrentFolderData, 1);
- data->impl = impl;
+ data->impl = g_object_ref (impl);
data->file = g_object_ref (file);
data->keep_trail = keep_trail;
data->clear_entry = clear_entry;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]