From 6faeeabbfc3f3a9517624968b0c8808164cfab87 Mon Sep 17 00:00:00 2001
From: fonotec <fonotec@hotmail.com>
Date: Tue, 21 Jul 2020 16:45:38 +0200
Subject: [PATCH] Allow black holes to not receive gravity forces if compiled
 with no gravity below ID N

---
 src/runner_others.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/runner_others.c b/src/runner_others.c
index b037b005aa..324b0ccf97 100644
--- a/src/runner_others.c
+++ b/src/runner_others.c
@@ -575,7 +575,7 @@ void runner_do_end_grav_force(struct runner *r, struct cell *c, int timer) {
         else if (gp->type == swift_type_stars)
           id = e->s->sparts[-gp->id_or_neg_offset].id;
         else if (gp->type == swift_type_black_hole)
-          error("Unexisting type");
+          id = e->s->bparts[-gp->id_or_neg_offset].id;
         else
           id = gp->id_or_neg_offset;
 
-- 
GitLab