diff --git a/src/space.c b/src/space.c index 7b03571e9e31b761d5dd4c85a26e51cacf5122fd..72ab8baa44a9498552293d0705d9b6193f6bcc8f 100644 --- a/src/space.c +++ b/src/space.c @@ -2150,7 +2150,7 @@ void space_split_recursive(struct space *s, struct cell *c, ti_beg_max = get_integer_time_begin(e->ti_current + 1, time_bin_max); /* Construct the multipole and the centre of mass*/ - if (s->gravity) gravity_P2M(c->multipole, c->gparts, c->gcount); + if (s->gravity && gcount > 0) gravity_P2M(c->multipole, c->gparts, c->gcount); } /* Set the values for this cell. */