mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
Merge branch 'plug-leak' into 'main'
filechooser: Plug a leak See merge request GNOME/gtk!7705
This commit is contained in:
commit
0a9b501743
@ -798,7 +798,8 @@ gtk_directory_list_start_monitoring (GtkDirectoryList *self)
|
||||
{
|
||||
g_assert (self->monitor == NULL);
|
||||
self->monitor = g_file_monitor_directory (self->file, G_FILE_MONITOR_WATCH_MOVES, NULL, NULL);
|
||||
g_signal_connect (self->monitor, "changed", G_CALLBACK (directory_changed), self);
|
||||
if (self->monitor)
|
||||
g_signal_connect (self->monitor, "changed", G_CALLBACK (directory_changed), self);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -4787,7 +4787,10 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
|
||||
current_folder = gtk_file_chooser_get_current_folder (chooser);
|
||||
|
||||
if (current_folder)
|
||||
g_list_store_append (result, current_folder);
|
||||
{
|
||||
g_list_store_append (result, current_folder);
|
||||
g_object_unref (current_folder);
|
||||
}
|
||||
}
|
||||
|
||||
return G_LIST_MODEL (result);
|
||||
|
Loading…
Reference in New Issue
Block a user