mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-18 21:10:00 +00:00
directorylist: Fix criticals if monitoring fails
g_file_monitor_directory () can fail. We're ignoring the actual error by passing NULL for the error argument, but we shouldn't be trying to connect to a signal on the NULL value that gets returned on error. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This commit is contained in:
parent
8964f6f0cc
commit
4e0a909ca9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user