[gnome-builder/wip/gtk4-port: 1029/1774] plugins/find-other-file: more type assertions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1029/1774] plugins/find-other-file: more type assertions
- Date: Mon, 11 Jul 2022 22:31:32 +0000 (UTC)
commit 5d31f30ea469f27e65965908c6c2434e800e9f2c
Author: Christian Hergert <chergert redhat com>
Date: Mon May 16 16:05:59 2022 -0700
plugins/find-other-file: more type assertions
src/plugins/find-other-file/gbp-find-other-file-popover.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/find-other-file/gbp-find-other-file-popover.c
b/src/plugins/find-other-file/gbp-find-other-file-popover.c
index 29f8e6be7..64c203707 100644
--- a/src/plugins/find-other-file/gbp-find-other-file-popover.c
+++ b/src/plugins/find-other-file/gbp-find-other-file-popover.c
@@ -75,9 +75,13 @@ static gpointer
file_to_found_file (gpointer item,
gpointer user_data)
{
- GbpFoundFile *found = gbp_found_file_new (user_data, item);
- g_object_unref (item);
- return found;
+ GFile *workdir = user_data;
+ g_autoptr(GFile) file = item;
+
+ g_assert (G_IS_FILE (workdir));
+ g_assert (G_IS_FILE (file));
+
+ return gbp_found_file_new (workdir, file);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]