diff --git a/src/cell.c b/src/cell.c index 7af65976ceade2f4f137f5b39ae89e4e3f1db8bb..775df65df55cd5ccace8317971088d8330ef30db 100644 --- a/src/cell.c +++ b/src/cell.c @@ -4458,7 +4458,8 @@ struct spart *cell_add_spart(struct engine *e, struct cell *const c) { /* Check that the cell was indeed drifted to this point to avoid future * issues */ #ifdef SWIFT_DEBUG_CHECKS - if (top->stars.count > 0 && top->stars.ti_old_part != e->ti_current) { + if (top->hydro.super != NULL && top->stars.count > 0 && + top->stars.ti_old_part != e->ti_current) { error("Cell had not been correctly drifted before star formation"); } #endif