Commit d7df2b4c authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix case when c == c->super.

parent 71145a19
......@@ -1329,12 +1329,16 @@ void cell_activate_drift_part(struct cell *c, struct scheduler *s) {
/* Set the do_sub_drifts all the way up and activate the super drift
if this has not yet been done. */
for (struct cell *parent = c->parent; parent != NULL && !parent->do_sub_drift;
parent = parent->parent) {
parent->do_sub_drift = 1;
if (parent == c->super) {
scheduler_activate(s, parent->drift_part);
break;
if (c == c->super) {
scheduler_activate(s, c->drift_part);
} else {
for (struct cell *parent = c->parent;
parent != NULL && !parent->do_sub_drift; parent = parent->parent) {
parent->do_sub_drift = 1;
if (parent == c->super) {
scheduler_activate(s, parent->drift_part);
break;
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment