- //tempTotals[i] = tempTotals[lc] + tempTotals[rc];
- }else { //if no, your tempTotal is your childrens temp totals
+ }else if ((nodePcountSize[lc] == 0) && (nodePcountSize[rc] == 0)) { tempTotals[i] = 0.0; //we don't care about you
+ }else { //if no, your tempTotal is your childrens temp totals + your branch length