We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73acd59 commit 6093eeaCopy full SHA for 6093eea
core/PhysiCell_cell.cpp
@@ -3485,8 +3485,9 @@ void Cell::remove_self_from_attackers( void )
3485
#pragma omp parallel for
3486
for (int j=0; j < all_cells->size(); j++)
3487
{
3488
- if (j != index && (*all_cells)[j]->phenotype.cell_interactions.pAttackTarget == this) {
3489
- (*all_cells)[j]->phenotype.cell_interactions.pAttackTarget = NULL;
+ Cell* pC = (*all_cells)[j];
+ if (( pC != this) && pC->phenotype.cell_interactions.pAttackTarget == this) {
3490
+ pC->phenotype.cell_interactions.pAttackTarget = NULL;
3491
}
3492
3493
0 commit comments