mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
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
This commit is contained in:
parent
c235747847
commit
8fc920144b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user