[gnome-builder/wip/gtk4-port] 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] plugins/find-other-file: more type assertions
 
- Date: Mon, 16 May 2022 23:45:48 +0000 (UTC)
 
commit 586cbec61b88db2f5b335686293b02f83d2cbc29
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]