mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
filechooser: Prevent a crash
With csd, we are handling external widgets when there is an entry in the headerbar. Use a weak ref to prevent that pointer from going stale. This fixes a crash when cancelling a save dialog. Fixes: #3110
This commit is contained in:
parent
7ee3439522
commit
756c52ef08
@ -2322,6 +2322,7 @@ save_widgets_create (GtkFileChooserWidget *impl)
|
||||
{
|
||||
location_entry_disconnect (impl);
|
||||
impl->location_entry = impl->external_entry;
|
||||
g_object_add_weak_pointer (impl->external_entry, (gpointer *)&impl->location_entry);
|
||||
location_entry_setup (impl);
|
||||
|
||||
g_signal_connect_after (gtk_entry_get_key_controller (GTK_ENTRY (impl->external_entry)),
|
||||
|
Loading…
Reference in New Issue
Block a user