[gnome-builder] libide/gui: fix ownership transfer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/gui: fix ownership transfer
- Date: Thu, 15 Sep 2022 00:32:56 +0000 (UTC)
commit d8d0439e88cf368b7d7d4cab5a18f7c60ad98148
Author: Christian Hergert <chergert redhat com>
Date: Wed Sep 14 17:07:13 2022 -0700
libide/gui: fix ownership transfer
ide_workbench_unload_project_completed() does not transfer ownership,
so we shouldn't be doing that.
src/libide/gui/ide-workbench.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/libide/gui/ide-workbench.c b/src/libide/gui/ide-workbench.c
index 84d110f73..67be8ac8e 100644
--- a/src/libide/gui/ide-workbench.c
+++ b/src/libide/gui/ide-workbench.c
@@ -1737,7 +1737,6 @@ ide_workbench_unload_async (IdeWorkbench *self,
* open-file requests can keep us alive while we're shutting
* down.
*/
-
ide_application_remove_workbench (IDE_APPLICATION (app), self);
/* If we haven't loaded a project, then there is nothing to
@@ -1746,7 +1745,7 @@ ide_workbench_unload_async (IdeWorkbench *self,
*/
if (self->project_info == NULL)
{
- ide_workbench_unload_project_completed (self, g_steal_pointer (&task));
+ ide_workbench_unload_project_completed (self, task);
IDE_EXIT;
}
@@ -1770,11 +1769,6 @@ ide_workbench_unload_async (IdeWorkbench *self,
g_object_ref (task));
}
- /* Since the g_steal_pointer() just before doesn't always run, ensure the
- * task isn't freed while it hasn't yet finished running asynchronously.
- */
- task = NULL;
-
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]