[gnome-builder/wip/gtk4-port: 841/1774] plugins/recent: fix lifecycle of project info structures
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 841/1774] plugins/recent: fix lifecycle of project info structures
- Date: Mon, 11 Jul 2022 22:31:25 +0000 (UTC)
commit ca2d01f3723b8c73cd5ce4d497d1d4c02fe58d32
Author: Christian Hergert <chergert redhat com>
Date: Mon May 2 16:19:51 2022 -0700
plugins/recent: fix lifecycle of project info structures
src/plugins/recent/gbp-recent-section.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/recent/gbp-recent-section.c b/src/plugins/recent/gbp-recent-section.c
index ed4857457..043fdf1ff 100644
--- a/src/plugins/recent/gbp-recent-section.c
+++ b/src/plugins/recent/gbp-recent-section.c
@@ -318,8 +318,14 @@ gbp_recent_section_purge_selected_full (IdeGreeterSection *section,
gboolean selected;
g_object_get (child, "selected", &selected, NULL);
+
if (selected)
- infos = g_list_prepend (infos, ide_greeter_row_get_project_info (IDE_GREETER_ROW (child)));
+ {
+ IdeProjectInfo *info;
+
+ if ((info = ide_greeter_row_get_project_info (IDE_GREETER_ROW (child))))
+ infos = g_list_prepend (infos, g_object_ref (info));
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]