Commit 63bc3542 authored by Matthias Clasen's avatar Matthias Clasen

path bar: Don't segfault if we get disposed quickly

The file chooser code now calls into the path bar in init,
starting an async operation. This unveiled that the path bar
code was not safe against being disposed early, by causing
a crahsh of the objects-finalize test.
Fix this by making the callback check for CANCELLED.
parent cb63fe04
......@@ -1791,6 +1791,9 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
const gchar *display_name;
gboolean is_hidden;
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
if (cancellable != file_info->path_bar->priv->get_info_cancellable)
gtk_path_bar_set_file_finish (file_info, FALSE);
......@@ -1876,6 +1879,7 @@ _gtk_path_bar_set_file (GtkPathBar *path_bar,
/* FIXME: This should be a construct-only property */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment