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:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user