From 3d24513eb8f16a5cbab76d5f29a437b62f3d2655 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Wed, 25 Apr 2018 14:23:06 +0200 Subject: [PATCH] Escape the self-task recursion in the gravity sub-cell unskipping only if the cell has *no* gparts not if it has *some* gparts. --- src/cell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cell.c b/src/cell.c index 2b40eb37c2..4d0884274c 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1870,7 +1870,7 @@ void cell_activate_subcell_grav_tasks(struct cell *ci, struct cell *cj, if (cj == NULL) { /* Do anything? */ - if (ci->gcount || !cell_is_active_gravity(ci, e)) return; + if (ci->gcount == 0 || !cell_is_active_gravity(ci, e)) return; /* Recurse? */ if (ci->split) { -- GitLab