filechooser: Use g_clear_object() on potentially NULL objects

We can reach here in early exit paths when the shortcut_files have not
been initialized yet.
This commit is contained in:
Benjamin Otte
2024-11-03 02:44:02 +01:00
parent ea08d92bc2
commit e9c9d1d0a0

View File

@@ -333,10 +333,9 @@ filechooser_win32_thread_data_free (FilechooserWin32ThreadData *data)
g_array_free (data->choices_selections, TRUE);
data->choices_selections = NULL;
}
g_object_unref (data->shortcut_files);
g_clear_object (&data->shortcut_files);
g_slist_free_full (data->files, g_object_unref);
if (data->self)
g_object_unref (data->self);
g_clear_object (&data->self);
g_free (data->accept_label);
g_free (data->cancel_label);
g_free (data->title);